Project

Profile

Help

Issue #8249

closed

pulp_rpm.app.exceptions.AdvisoryConflict after a migration from pulp2

Added by ttereshc about 3 years ago. Updated about 3 years ago.

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

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.

Actions #1

Updated by ttereshc about 3 years ago

  • Description updated (diff)
Actions #2

Updated by jsherril@redhat.com about 3 years ago

  • Tags Katello added
Actions #3

Updated by dalley about 3 years ago

  • Sprint set to Sprint 90
Actions #4

Updated by dalley about 3 years ago

  • Priority changed from Normal to High
  • Triaged changed from No to Yes
Actions #5

Updated by rchan about 3 years ago

  • Sprint changed from Sprint 90 to Sprint 91
Actions #6

Updated by ggainey about 3 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ggainey
Actions #7

Updated by ggainey about 3 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.

Actions #8

Updated by pulpbot about 3 years ago

  • Status changed from ASSIGNED to POST

Added by ggainey about 3 years ago

Revision c7753780 | View on GitHub

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

Actions #9

Updated by ggainey about 3 years ago

  • Status changed from POST to MODIFIED
Actions #10

Updated by dalley about 3 years ago

  • Sprint/Milestone set to 3.10.0
Actions #11

Updated by dalley about 3 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF