Project

Profile

Help

Issue #6640

Migrating with custom name raises UnboundLocalError: local variable 'pulp2repo' referenced before assignment

Added by ttereshc over 1 year ago. Updated about 1 year ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 75
Quarter:

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

Associated revisions

Revision e9253a2f View on GitHub
Added by ttereshc over 1 year ago

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

Revision e9253a2f View on GitHub
Added by ttereshc over 1 year ago

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

Revision e9253a2f View on GitHub
Added by ttereshc over 1 year ago

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

History

#1 Updated by ttereshc over 1 year ago

  • Triaged changed from No to Yes

#2 Updated by ipanova@redhat.com over 1 year ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ipanova@redhat.com
  • Sprint set to Sprint 75

#3 Updated by ipanova@redhat.com over 1 year ago

  • Assignee changed from ipanova@redhat.com to ttereshc

#4 Updated by ttereshc over 1 year ago

  • Status changed from ASSIGNED to MODIFIED

#7 Updated by ttereshc about 1 year ago

  • Sprint/Milestone set to 0.2.0

#8 Updated by ttereshc about 1 year ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF