Project

Profile

Help

Issue #6640

closed

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

Added by ttereshc over 4 years ago. Updated over 4 years 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

Actions #1

Updated by ttereshc over 4 years ago

  • Triaged changed from No to Yes
Actions #2

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

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

closes #6640 https://pulp.plan.io/issues/6640

closes #6966 https://pulp.plan.io/issues/6966

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

closes #6640 https://pulp.plan.io/issues/6640

closes #6966 https://pulp.plan.io/issues/6966

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

closes #6640 https://pulp.plan.io/issues/6640

closes #6966 https://pulp.plan.io/issues/6966

Actions #3

Updated by ipanova@redhat.com over 4 years ago

  • Assignee changed from ipanova@redhat.com to ttereshc
Actions #4

Updated by ttereshc over 4 years ago

  • Status changed from ASSIGNED to MODIFIED
Actions #7

Updated by ttereshc over 4 years ago

  • Sprint/Milestone set to 0.2.0
Actions #8

Updated by ttereshc over 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF