Issue #8249
closedpulp_rpm.app.exceptions.AdvisoryConflict after a migration from pulp2
Description
During copy or sync operation after a migration from pulp 2, it is possible to get a conflict for advisories.
pulp_rpm.app.exceptions.AdvisoryConflict: 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.
Updated by dalley almost 4 years ago
- Priority changed from Normal to High
- Triaged changed from No to Yes
Updated by ggainey almost 4 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to ggainey
Updated by ggainey almost 4 years 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 https://dl.fedoraproject.org/pub/epel/7Server/x86_64/ --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.
Updated by pulpbot almost 4 years ago
- Status changed from ASSIGNED to POST
Added by ggainey almost 4 years ago
Updated by ggainey almost 4 years ago
- Status changed from POST to MODIFIED
Applied in changeset c7753780282d97d9dfa5180a741549d9c448a81f.
Updated by dalley over 3 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
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