Project

Profile

Help

Issue #7053

closed

Error migrating after cloning repo contents: Pulp2Repository matching query does not exist.

Added by jsherril@redhat.com over 4 years ago. Updated over 4 years ago.

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

Description

Steps to reproduce:

  1. sync down RHEL 8 OS and RHEL 8 appstream to 2 different repos in pulp2 (note, may not need both, may be able to reproduce with some other repo, nots ure)
  2. Create two new repos with pulp2 and clone the content from the ones synced down in step 2
  3. Delete the cloned content
  4. Attempt to do a simple migration:
{
  "plugins": [
    {
      "type": "docker",
      "repositories": []
    },
    {
      "type": "iso",
      "repositories": []
    },
    {
      "type": "rpm",
      "repositories": [
        {
          "name": "0d9b7b71-30b3-49d7-abbb-eade4d2f1cb4",
          "repository_versions": [
            {
              "pulp2_repository_id": "0d9b7b71-30b3-49d7-abbb-eade4d2f1cb4",
              "pulp2_distributor_repository_ids": [
                "0d9b7b71-30b3-49d7-abbb-eade4d2f1cb4"
              ]
            }
          ],
          "pulp2_importer_repository_id": "0d9b7b71-30b3-49d7-abbb-eade4d2f1cb4"
        },
        {
          "name": "69ff76ed-208d-4261-9223-7a456b88ac84",
          "repository_versions": [
            {
              "pulp2_repository_id": "69ff76ed-208d-4261-9223-7a456b88ac84",
              "pulp2_distributor_repository_ids": [
                "69ff76ed-208d-4261-9223-7a456b88ac84"
              ]
            }
          ],
          "pulp2_importer_repository_id": "69ff76ed-208d-4261-9223-7a456b88ac84"
        }
      ]
    }
  ]
}

results:

pulp: rq.worker:ERROR: pulp_2to3_migration.app.models.repository.Pulp2Repository.DoesNotExist: Pulp2Repository matching query does not exist.
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/rq/worker.py", line 883, in perform_job
rv = job.perform()
File "/usr/local/lib/python3.6/site-packages/rq/job.py", line 645, in perform
self._result = self._execute()
File "/usr/local/lib/python3.6/site-packages/rq/job.py", line 651, in _execute
return self.func(*self.args, **self.kwargs)
File "/usr/local/lib/python3.6/site-packages/pulp_2to3_migration/app/tasks/migrate.py", line 127, in migrate_from_pulp2
migrate_content(plan)
File "/usr/local/lib/python3.6/site-packages/pulp_2to3_migration/app/migration.py", line 34, in migrate_content
plugin.migrator.migrate_content_to_pulp3()
File "/usr/local/lib/python3.6/site-packages/pulp_2to3_migration/app/plugin/rpm/migrator.py", line 148, in migrate_content_to_pulp3
loop.run_until_complete(dm.create())
File "/usr/lib64/python3.6/asyncio/base_events.py", line 484, in run_until_complete
return future.result()
File "/usr/local/lib/python3.6/site-packages/pulp_2to3_migration/app/plugin/content.py", line 84, in create
await pipeline
File "/usr/local/lib/python3.6/site-packages/pulpcore/plugin/stages/api.py", line 225, in create_pipeline
await asyncio.gather(*futures)
File "/usr/local/lib/python3.6/site-packages/pulpcore/plugin/stages/api.py", line 43, in __call__
await self.run()
File "/usr/local/lib/python3.6/site-packages/pulp_2to3_migration/app/plugin/rpm/migrator.py", line 203, in run
thru = self.relate_packages_to_group(dc)
File "/usr/local/lib/python3.6/site-packages/pulp_2to3_migration/app/plugin/rpm/migrator.py", line 286, in relate_packages_to_group
not_in_plan=False)
File "/usr/lib/python3.6/site-packages/django/db/models/manager.py", line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/django/db/models/query.py", line 408, in get
self.model._meta.object_name
pulp_2to3_migration.app.models.repository.Pulp2Repository.DoesNotExist: Pulp2Repository matching query does not exist.
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/rq/worker.py", line 883, in perform_job
rv = job.perform()
File "/usr/local/lib/python3.6/site-packages/rq/job.py", line 645, in perform
self._result = self._execute()
File "/usr/local/lib/python3.6/site-packages/rq/job.py", line 651, in _execute
return self.func(*self.args, **self.kwargs)
 File "/usr/local/lib/python3.6/site-packages/pulp_2to3_migration/app/tasks/migrate.py", line 127, in migrate_from_pulp2
 migrate_content(plan)
 File "/usr/local/lib/python3.6/site-packages/pulp_2to3_migration/app/migration.py", line 34, in migrate_content
 plugin.migrator.migrate_content_to_pulp3()
 File "/usr/local/lib/python3.6/site-packages/pulp_2to3_migration/app/plugin/rpm/migrator.py", line 148, in migrate_content_to_pulp3
 loop.run_until_complete(dm.create())
 File "/usr/lib64/python3.6/asyncio/base_events.py", line 484, in run_until_complete
 return future.result()
 File "/usr/local/lib/python3.6/site-packages/pulp_2to3_migration/app/plugin/content.py", line 84, in create
 await pipeline
 File "/usr/local/lib/python3.6/site-packages/pulpcore/plugin/stages/api.py", line 225, in create_pipeline
 await asyncio.gather(*futures)
 File "/usr/local/lib/python3.6/site-packages/pulpcore/plugin/stages/api.py", line 43, in __call__
 await self.run()
 File "/usr/local/lib/python3.6/site-packages/pulp_2to3_migration/app/plugin/rpm/migrator.py", line 203, in run
 thru = self.relate_packages_to_group(dc)
 File "/usr/local/lib/python3.6/site-packages/pulp_2to3_migration/app/plugin/rpm/migrator.py", line 286, in relate_packages_to_group
 not_in_plan=False)
 File "/usr/lib/python3.6/site-packages/django/db/models/manager.py", line 82, in manager_method
 return getattr(self.get_queryset(), name)(*args, **kwargs)
 File "/usr/lib/python3.6/site-packages/django/db/models/query.py", line 408, in get
 self.model._meta.object_name
 pulp_2to3_migration.app.models.repository.Pulp2Repository.DoesNotExist: Pulp2Repository matching query does not exist.


Related issues

Is duplicate of Migration Plugin - Task #7020: Adjust comps.xml migration pipeline and do not create relationsCLOSED - CURRENTRELEASEttereshc

Actions
Actions #1

Updated by jsherril@redhat.com over 4 years ago

  • Tags Katello added
Actions #2

Updated by jsherril@redhat.com over 4 years ago

  • Project changed from Pulp to Migration Plugin
Actions #3

Updated by jsherril@redhat.com over 4 years ago

  • Subject changed from Error migrating after deleting 'cloned' repo: Pulp2Repository matching query does not exist. to Error migrating after cloning repo contents: Pulp2Repository matching query does not exist.
Actions #4

Updated by jsherril@redhat.com over 4 years ago

I've actually been able to reproduce it more simply by:

  1. create a pulp2 repo and sync https://jlsherrill.fedorapeople.org/fake-repos/needed-errata/
  2. create a 2nd pulp2 repo
  3. Copy rpms, errata, package groups, package environments to the 2nd repo
  4. Try to migrate both repos as two different repos in pulp3, similar to the plan above.

If you don't copy the package groups at step 3, it seems to work

Actions #5

Updated by ttereshc over 4 years ago

  • Sprint/Milestone set to 0.2.0
Actions #6

Updated by ttereshc over 4 years ago

  • Priority changed from Normal to High
Actions #7

Updated by ipanova@redhat.com over 4 years ago

we might get rid of this issue once we remove the relations in comps https://pulp.plan.io/issues/7020

Actions #8

Updated by ttereshc over 4 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ttereshc
Actions #9

Updated by ttereshc over 4 years ago

  • Status changed from ASSIGNED to NEW
  • Assignee deleted (ttereshc)

We should merge relations removal for comps soon. Postpone solving this till that.

Actions #10

Updated by ttereshc over 4 years ago

  • Status changed from NEW to CLOSED - DUPLICATE

Fixed by #7020 fix. Closing as a duplicate.

Actions #11

Updated by ttereshc over 4 years ago

  • Is duplicate of Task #7020: Adjust comps.xml migration pipeline and do not create relations added
Actions #12

Updated by ttereshc over 4 years ago

  • Status changed from CLOSED - DUPLICATE to CLOSED - CURRENTRELEASE

Also available in: Atom PDF