Issue #6097
closeddocker migration fails with 'NoneType' object has no attribute 'pulp2_repo_id'
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'
Updated by dalley almost 5 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to dalley
Updated by dalley almost 5 years ago
I wasn't able to reproduce it with this repo plan, which mirrors the same structure.
Is there anything notable about the order of operations or the repositories in question?
{
"plan": {
"plugins": [
{
"repositories": [
{
"name": "test-fixture-1",
"pulp2_importer_repository_id": "test-fixture-1",
"repository_versions": [
{
"pulp2_distributor_repository_ids": [
"test-fixture-1"
],
"pulp2_repository_id": "test-fixture-1"
}
]
},
{
"name": "test-fixture-2",
"repository_versions": [
{
"pulp2_distributor_repository_ids": [
"test-fixture-2"
],
"pulp2_repository_id": "test-fixture-2"
}
]
}
],
"type": "docker"
}
]
},
"pulp_created": "2020-02-06T03:30:54.323032Z",
"pulp_href": "/pulp/api/v3/migration-plans/d9676d3c-32ff-4380-9988-b58d808b1464/"
}
Updated by ttereshc almost 5 years ago
Distributor is from a repo which is not migrated. Maybe we didn't fix all places for docker importers/distributors when thier repos are not migrated.
Updated by ttereshc almost 5 years ago
Added by ttereshc almost 5 years ago
Added by ttereshc almost 5 years ago
Revision cb9d1477 | View on GitHub
Fix docker repo migration with a custom distributor
Added by ttereshc almost 5 years ago
Revision cb9d1477 | View on GitHub
Fix docker repo migration with a custom distributor
Updated by ttereshc almost 5 years ago
- Status changed from ASSIGNED to MODIFIED
Applied in changeset pulp:pulp-2to3-migration|cb9d1477082bc601837e265df0c9fe0f26eff2af.
Updated by ipanova@redhat.com almost 5 years ago
- Triaged changed from No to Yes
- Sprint set to Sprint 65
Updated by ttereshc almost 5 years ago
Applied in changeset pulp-2to3-migration|cb9d1477082bc601837e265df0c9fe0f26eff2af.
Updated by ttereshc almost 5 years ago
Applied in changeset pulp:pulp-2to3-migrate|cb9d1477082bc601837e265df0c9fe0f26eff2af.
Updated by ttereshc over 4 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Updated by bmbouter over 4 years ago
- Tags deleted (
Pulp 2 to 3 Migrate)
We're removing the 'Pulp 2 to 3 Migrate' tag to allow membership of the Migration Plugin project in Redmine to be the controlling area https://pulp.plan.io/projects/migration
Fix docker repo migration with a custom distributor
closes #6097 https://pulp.plan.io/issues/6097/