Project

Profile

Help

Issue #6097

docker migration fails with 'NoneType' object has no attribute 'pulp2_repo_id'

Added by jsherril@redhat.com over 1 year ago. Updated over 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:
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'

Associated revisions

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

Fix docker repo migration with a custom distributor

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

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

Fix docker repo migration with a custom distributor

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

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

Fix docker repo migration with a custom distributor

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

History

#1 Updated by daviddavis over 1 year ago

  • Tags Pulp 2 to 3 Migrate added

#2 Updated by dalley over 1 year ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to dalley

#3 Updated by dalley over 1 year 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/"
}

#4 Updated by ttereshc over 1 year 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.

#6 Updated by ttereshc over 1 year ago

  • Status changed from ASSIGNED to MODIFIED

#7 Updated by dalley over 1 year ago

  • Assignee changed from dalley to ttereshc

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

  • Triaged changed from No to Yes
  • Sprint set to Sprint 65

#11 Updated by ttereshc over 1 year ago

  • Sprint/Milestone set to 0.1.0

#12 Updated by ttereshc over 1 year ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

#13 Updated by bmbouter over 1 year 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

Please register to edit this issue

Also available in: Atom PDF