Bug 2056702

Summary: Import library with overlapping content can fail with unique-constraint violation
Product: Red Hat Satellite Reporter: Joniel Pasqualetto <jpasqual>
Component: PulpAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.10.2CC: dalley, dkliban, ggainey, osousa, pcreech, piersellisonvpg, pmoravec, rchan, zhunting
Target Milestone: 6.12.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2103100 2170947 (view as bug list) Environment:
Last Closed: 2022-11-16 13:33:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joniel Pasqualetto 2022-02-21 22:09:22 UTC
Description of problem:

Importing library with overlapping content on repositories may still hit a condition to fail with unique-constraint, even after [1]

[1] https://pulp.plan.io/issues/8633

Version-Release number of selected component (if applicable):


How reproducible:
Unsure

Steps to Reproduce:
1. Have multiple repositories with overlapping content
2. Export the the entire library
3. Import the library (??)

Actual results:

Import tasks may fail

Expected results:

Import task should not fail

Additional info:

Feb 18 16:37:09 satellite pulpcore-worker-16: pulp [c4544ea4-4cbb-496b-868b-e2362973317b]: pulpcore.app.tasks.importer:INFO: ...1 import-errors encountered importing pulp_rpm.app.modelresource.PackageResource.json from repository-Red_Hat_Enterprise_Linux_7_Server_RPMs_x86_64_7Server-45550_9, retrying
Feb 18 16:45:06 satellite pulpcore-worker-16: pulp [c4544ea4-4cbb-496b-868b-e2362973317b]: pulpcore.app.tasks.importer:ERROR: FATAL import-failure importing pulp_rpm.app.modelresource.PackageResource.json from repository-Red_Hat_Enterprise_Linux_7_Server_RPMs_x86_64_7Server-45550_9

Comment 10 Lai 2022-06-08 05:01:56 UTC
Steps to retest:
1. Have multiple repositories with overlapping content (I chose rhel7)
2. Export the the entire library
3. Import the library

Expected result:
Import should be successful and contains all the library content

Actual result:
Import is successful and contains all the library content


There's no concrete way to test this since it was observed in RHEL7 and on one customer db.

Verified on 6.11 snap 23 with python38-pulpcore-3.16.8-2.el8pc.noarch

Comment 12 pulp-infra@redhat.com 2022-06-16 15:23:56 UTC
Requesting needsinfo from upstream developer dkliban, ggainey because the 'FailedQA' flag is set.

Comment 15 Brad Buckingham 2022-07-07 12:57:25 UTC
Moving to POST based upon discussion in Satellite standup.

Comment 17 Lai 2022-08-24 21:49:37 UTC
Steps to retest:
1. Have multiple repositories with overlapping content (I chose rhel7)
2. Export the the entire library
3. Import the library

Expected result:
Import should be successful and contains all the library content

Actual result:
Import is successful and contains all the library content


There's no concrete way to test this since it was observed in RHEL7 and on one customer db.

Verified in 6.12 snap 7

Comment 22 errata-xmlrpc 2022-11-16 13:33:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Satellite 6.12 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:8506

Comment 23 Red Hat Bugzilla 2023-09-18 04:32:27 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days

Comment 24 Marypage 2024-08-02 10:05:50 UTC
Problem Description:
When importing a library with duplicate content from different repositories, there may be a failure due to a unique constraint violation.

Steps to Reproduce:
Have multiple repositories with overlapping content.
Export the entire library.
Attempt to import the library.
Actual Results:
The import process may fail.

Expected Results:
The import process should succeed.
I used the essay writing service https://papersowl.com/examples/the-importance-of-being-earnest/ to test it out. This service also offers a variety of essays on different topics to assist students.