Issue #8249 after a migration from pulp2

Added by ttereshc 8 months ago. Updated 7 months ago.

Start date:
Due date:
Estimated time:
2. Medium
Platform Release:
Sprint Candidate:
Sprint 91


During copy or sync operation after a migration from pulp 2, it is possible to get a conflict for advisories. Incoming and existing advisories have the same id and timestamp but different and intersecting package lists. At least one of them is wrong. Advisory id: FEDORA-EPEL-2019-927a9446df

Because of Pulp 2 filtering out packages from pkglist when they are not in a repo and some advisories referring to packages which are not in a repo, it is not possible to migrate a full original advisory from Pulp 2 to Pulp 3.
Such advisory will have a subset of packages from the original advisory pkglist.
E.g. FEDORA-EPEL-2019-927a9446df` from EPEL7 repo refers to a binary and to a source rpm (php-robrichards-xmlseclibs-2.1.1-1), in EPEL repo there are only binary ones present, so such advisories will always cause a conflict after migration.

A workaround (not an easy or straightforward one) for users is to remove such advisories from Pulp 3.

Proposed solution: Do not raise a conflict when one pkglist is a subset of another, just pick the one with superset.

Associated revisions

Revision c7753780 View on GitHub
Added by ggainey 8 months ago

Fixed another advisory-conflict edge case.

If incoming and existing advisories are 'the same', but one's pkglist is a proper-subset of the other - choose the larger pkglist.

fixes #8249


#1 Updated by ttereshc 8 months ago

  • Description updated (diff)

#2 Updated by 8 months ago

  • Tags Katello added

#3 Updated by dalley 8 months ago

  • Sprint set to Sprint 90

#4 Updated by dalley 8 months ago

  • Priority changed from Normal to High
  • Triaged changed from No to Yes

#5 Updated by rchan 8 months ago

  • Sprint changed from Sprint 90 to Sprint 91

#6 Updated by ggainey 8 months ago

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

#7 Updated by ggainey 8 months ago

To reproduce on the pulp2-nightly-pulp3-source-centos7 box:

pulp-admin login -u admin -p admin
pulp-admin rpm repo create --repo-id epel7 --feed --download-policy on_demand
pulp-admin rpm repo sync run --repo-id epel7
http POST :24817/pulp/api/v3/migration-plans/ plan='{"plugins": [{"type": "rpm"}]}' 
http POST :<href-from-above>/run/
http :<task-href-from-above>
pulp rpm remote list # looking for <uuid>-epel7
pulp rpm repository sync --name epel7 --remote <uuid>-epel7
http :/pulp/api/v3/tasks/2a9d4664-76d1-4c90-90c6-2b4c89aef087/

(Need to update my pulp-cli so I can use it for migrations as well!)

Investigation in progress. The interactions of previous, added, version, is_previous_version(), updated_date, and pkglist-set-theory, is more complicated than it looks at first glance.

#8 Updated by pulpbot 8 months ago

  • Status changed from ASSIGNED to POST

#9 Updated by ggainey 8 months ago

  • Status changed from POST to MODIFIED

#10 Updated by dalley 7 months ago

  • Sprint/Milestone set to 3.10.0

#11 Updated by dalley 7 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF