Issue #6640
closedMigrating with custom name raises UnboundLocalError: local variable 'pulp2repo' referenced before assignment
Description
It happens if I specify a name for a repo different from a pulp 2 one. E.g. I'd like to migrate rpm_unsigned.
{
"plugins": [
{
"type": "rpm",
"repositories": [
{
"name": "random_name",
"repository_versions": [
{
"pulp2_repository_id": "rpm_unsigned",
"pulp2_distributor_repository_ids": [
"rpm_unsigned"
]
}
],
"pulp2_importer_repository_id": "rpm_unsigned"
}
]
}
]
}
: pulp: rq.worker:ERROR: UnboundLocalError: local variable 'pulp2repo' referenced before assignment
: Traceback (most recent call last):
: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/worker.py", line 886, in perform_job
: rv = job.perform()
: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/job.py", line 664, in perform
: self._result = self._execute()
: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/job.py", line 670, in _execute
: return self.func(*self.args, **self.kwargs)
: File "/home/vagrant/devel/pulp-2to3-migration/pulp_2to3_migration/app/tasks/migrate.py", line 122, in migrate_from_pulp2
: migrate_repositories(plan)
: File "/home/vagrant/devel/pulp-2to3-migration/pulp_2to3_migration/app/migration.py", line 99, in migrate_repositories
: pulp2repo.pulp3_repository = repo
: UnboundLocalError: local variable 'pulp2repo' referenced before assignment
Updated by ipanova@redhat.com over 4 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to ipanova@redhat.com
- Sprint set to Sprint 75
Added by ttereshc over 4 years ago
Added by ttereshc over 4 years ago
Revision e9253a2f | View on GitHub
Set pulp3_repo relation for all the cases, including remigration.
As a side effect, also fixes the case when a repo name differs from the pulp2 one.
closes #6964 https://pulp.plan.io/issues/6964
Added by ttereshc over 4 years ago
Revision e9253a2f | View on GitHub
Set pulp3_repo relation for all the cases, including remigration.
As a side effect, also fixes the case when a repo name differs from the pulp2 one.
closes #6964 https://pulp.plan.io/issues/6964
Updated by ipanova@redhat.com over 4 years ago
- Assignee changed from ipanova@redhat.com to ttereshc
Updated by ttereshc over 4 years ago
- Status changed from ASSIGNED to MODIFIED
Applied in changeset pulp:pulp-2to3-migration|e9253a2fc4747e809f2cce8d4bd9134773c42992.
Updated by ttereshc over 4 years ago
Applied in changeset pulp-2to3-migration|e9253a2fc4747e809f2cce8d4bd9134773c42992.
Updated by ttereshc over 4 years ago
Applied in changeset pulp:pulp-2to3-migrate|e9253a2fc4747e809f2cce8d4bd9134773c42992.
Updated by ttereshc over 4 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Set pulp3_repo relation for all the cases, including remigration.
As a side effect, also fixes the case when a repo name differs from the pulp2 one.
closes #6964 https://pulp.plan.io/issues/6964
closes #6640 https://pulp.plan.io/issues/6640
closes #6966 https://pulp.plan.io/issues/6966