Actions
Issue #6097
closeddocker migration fails with 'NoneType' object has no attribute 'pulp2_repo_id'
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Katello-P2
Sprint:
Sprint 65
Quarter:
Description
here's my migration plan:
{
"plugins":[
{
"type":"docker",
"repositories":[
{
"name":"9084e06f-8a31-46ed-b762-eb2c63c646c4",
"repository_versions":[
{
"pulp2_repository_id":"9084e06f-8a31-46ed-b762-eb2c63c646c4",
"pulp2_distributor_repository_ids":[
"9084e06f-8a31-46ed-b762-eb2c63c646c4"
]
}
],
"pulp2_importer_repository_id":"9084e06f-8a31-46ed-b762-eb2c63c646c4"
},
{
"name":"myview-3-2",
"repository_versions":[
{
"pulp2_repository_id":"1-myview-v1_0-9084e06f-8a31-46ed-b762-eb2c63c646c4",
"pulp2_distributor_repository_ids":[
"1-myview-library-9084e06f-8a31-46ed-b762-eb2c63c646c4"
]
}
]
}
]
}
]
}
Here's the traceback it throws:
pulp: rq.worker:ERROR: AttributeError: 'NoneType' object has no attribute 'pulp2_repo_id'
Traceback (most recent call last):
File "/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/worker.py", line 822, in perform_job
rv = job.perform()
File "/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/job.py", line 605, in perform
self._result = self._execute()
File "/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/job.py", line 611, in _execute
return self.func(*self.args, **self.kwargs)
File "/usr/local/lib/pulp/src/pulp/pulp_2to3_migration/app/tasks/migrate.py", line 116, in migrate_from_pulp2
loop.run_until_complete(migrate_distributors(plan))
File "/usr/lib64/python3.6/asyncio/base_events.py", line 484, in run_until_complete
return future.result()
File "/usr/local/lib/pulp/src/pulp/pulp_2to3_migration/app/migration.py", line 222, in migrate_distributors
migrated_repo.pulp3_repository_version
File "/usr/local/lib/pulp/src/pulp/pulp_2to3_migration/app/migration.py", line 157, in migrate_repo_distributor
pulp2dist, repo_version)
File "/usr/local/lib/pulp/src/pulp/pulp_2to3_migration/app/plugin/docker/repository.py", line 56, in migrate_to_pulp3
'repo-registry-id', pulp2distributor.pulp2_repository.pulp2_repo_id)
AttributeError: 'NoneType' object has no attribute 'pulp2_repo_id'
Traceback (most recent call last):
File "/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/worker.py", line 822, in perform_job
rv = job.perform()
File "/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/job.py", line 605, in perform
self._result = self._execute()
File "/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/job.py", line 611, in _execute
return self.func(*self.args, **self.kwargs)
File "/usr/local/lib/pulp/src/pulp/pulp_2to3_migration/app/tasks/migrate.py", line 116, in migrate_from_pulp2
loop.run_until_complete(migrate_distributors(plan))
File "/usr/lib64/python3.6/asyncio/base_events.py", line 484, in run_until_complete
return future.result()
File "/usr/local/lib/pulp/src/pulp/pulp_2to3_migration/app/migration.py", line 222, in migrate_distributors
migrated_repo.pulp3_repository_version
File "/usr/local/lib/pulp/src/pulp/pulp_2to3_migration/app/migration.py", line 157, in migrate_repo_distributor
pulp2dist, repo_version)
File "/usr/local/lib/pulp/src/pulp/pulp_2to3_migration/app/plugin/docker/repository.py", line 56, in migrate_to_pulp3
'repo-registry-id', pulp2distributor.pulp2_repository.pulp2_repo_id)
AttributeError: 'NoneType' object has no attribute 'pulp2_repo_id'
Actions
Fix docker repo migration with a custom distributor
closes #6097 https://pulp.plan.io/issues/6097/