Project

Profile

Help

Issue #8562

closed

debian migration fails with: PackageReleaseComponent matching query does not exist

Added by jsherril@redhat.com about 3 years ago. Updated over 2 years ago.

Status:
CLOSED - WORKSFORME
Priority:
Normal
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

This is debian migration related:

        "traceback": "  File \"/usr/lib/python3.6/site-packages/rq/worker.py\", line 936, in perform_job
    rv = job.perform()
  File \"/usr/lib/python3.6/site-packages/rq/job.py\", line 684, in perform
    self._result = self._execute()
  File \"/usr/lib/python3.6/site-packages/rq/job.py\", line 690, in _execute
    return self.func(*self.args, **self.kwargs)
  File \"/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/tasks/migrate.py\", line 81, in migrate_from_pulp2
    migrate_content(plan, skip_corrupted=skip_corrupted)
  File \"/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/migration.py\", line 47, in migrate_content
    plugin.migrator.migrate_content_to_pulp3(skip_corrupted=skip_corrupted)
  File \"/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/plugin/deb/migrator.py\", line 85, 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/lib/python3.6/site-packages/pulp_2to3_migration/app/plugin/content.py\", line 89, in create
    await pipeline
  File \"/usr/lib/python3.6/site-packages/pulpcore/plugin/stages/api.py\", line 225, in create_pipeline
    await asyncio.gather(*futures)
  File \"/usr/lib/python3.6/site-packages/pulpcore/plugin/stages/api.py\", line 43, in __call__
    await self.run()
  File \"/usr/lib/python3.6/site-packages/pulpcore/plugin/stages/content_stages.py\", line 105, in run
    d_content.content.q()
  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

PackageReleaseComponent matching query does not exist.

katello user filed it here: https://projects.theforeman.org/issues/32284

Actions #1

Updated by jsherril@redhat.com about 3 years ago

  • Description updated (diff)
Actions #2

Updated by jsherril@redhat.com about 3 years ago

  • Subject changed from migration fails with: PackageReleaseComponent matching query does not exist. to debian migration fails with: PackageReleaseComponent matching query does not exist
Actions #3

Updated by quba42 almost 3 years ago

This feature (pulp_deb 2to3 migration within Katello) really is not ready to be used (entirely untested and also missing DB columns on the Katello side).

That being said, my thoughts on the bug:

  • First of all the error message does not make any sense to me, since I do not believe the migration itself ever "queries" for existing "PackageReleaseComponent" units. Is this a re-migration scenario?

Things I just don't know enough about yet (but are possible error sources):

  • What do Katello migration plans look like? (So far I have only tested pulp_deb 2to3 with "simple" migration plans).
  • Katello (in Pulp 2 world) did a lot of copying of Pulp repositories. I am not sure of the top of my head what exactly pulp_deb metadata units in such copied repos look like, and how that might interact with the pulp_deb 2to3 migration.
Actions #4

Updated by ipanova@redhat.com almost 3 years ago

Some highlights from the irc conversation - in case some pulp_debian packages were corrupted or artifact missing, it will be skipped. PackageReleaseComponent creation relies on the package being already saved by that time https://github.com/pulp/pulp-2to3-migration/blob/master/pulp_2to3_migration/app/plugin/deb/pulp_2to3_models.py#L454

Actions #5

Updated by quba42 almost 3 years ago

This could become a fix for what might be the underlying problem: https://github.com/pulp/pulp-2to3-migration/pull/353

Actions #6

Updated by quba42 almost 3 years ago

I don't really understand this traceback: At some point during the pipeline run, during the ContentSaver stage, while looping over d_content.d_artifacts django complains that a matching query does not exist for the artifactless type PackageReleaseComponent?

Actions #7

Updated by ipanova@redhat.com almost 3 years ago

quba42 wrote:

I don't really understand this traceback: At some point during the pipeline run, during the ContentSaver stage, while looping over d_content.d_artifacts django complains that a matching query does not exist for the artifactless type PackageReleaseComponent?

I think you should look at pulpcore 3.7 branch https://github.com/pulp/pulpcore/blob/3.7/pulpcore/plugin/stages/content_stages.py#L105

Actions #8

Updated by quba42 almost 3 years ago

I have no idea how to continue debugging this without a reproducer...

Actions #9

Updated by ttereshc over 2 years ago

  • Status changed from NEW to CLOSED - WORKSFORME

There were a lot of changes since this issue has been filed. I'm closing this for now as there is no reproducer available.
Feel free to open a new issue if more information (or preferably a reproducer) is available.

Also available in: Atom PDF