Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2253381 - Failed incremental CV import shows error: duplicate key value violates unique constraint "rpm_updatecollectionname_name_update_record_id_6ef33bed_uniq" [NEEDINFO]
Summary: Failed incremental CV import shows error: duplicate key value violates unique...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Pulp
Version: 6.13.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: 6.15.0
Assignee: satellite6-bugs
QA Contact: sganar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-12-07 00:56 UTC by Brenden Wood
Modified: 2024-05-05 11:28 UTC (History)
20 users (show)

Fixed In Version: pulp_rpm-3.17.22, pulp_rpm-3.18.20, pulp_rpm-3.19.12, pulp_rpm-3.23.3, pulp_rpm-3.25.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2266139 (view as bug list)
Environment:
Last Closed: 2024-04-23 17:16:06 UTC
Target Upstream Version:
Embargoed:
arahaman: needinfo? (satellite6-bugs)
arahaman: needinfo? (wclark)


Attachments (Terms of Use)
RHEL 8 Hotfix RPM for Satellite 6.11.5.6 (388.31 KB, application/x-rpm)
2024-02-21 21:15 UTC, Ian Ballou
no flags Details
RHEL 7 Hotfix RPM for Satellite 6.11.5.6 (403.80 KB, application/x-rpm)
2024-02-21 21:21 UTC, Ian Ballou
no flags Details
Hotfix RPM for Satellite 6.14.2 (414.21 KB, application/x-rpm)
2024-02-26 22:35 UTC, wclark
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github pulp pulp_rpm issues 3380 0 None closed Failed content view import due to "duplicate key value violates unique constraint" 2024-02-09 16:04:43 UTC
Red Hat Issue Tracker SAT-21768 0 None None None 2023-12-07 00:57:52 UTC
Red Hat Issue Tracker SAT-23469 0 None None None 2024-02-27 20:16:05 UTC
Red Hat Knowledge Base (Solution) 7058608 0 None None None 2024-04-10 14:46:39 UTC
Red Hat Product Errata RHSA-2024:2010 0 None None None 2024-04-23 17:16:08 UTC

Description Brenden Wood 2023-12-07 00:56:33 UTC
Description of problem:

We are running a CV version import ( incremental ) with:


```
hammer content-import version --organization-id=1 --path=/var/lib/pulp/imports/2023-1-28T03-49-03-00-00
```

...but has produced the following errors repeated for several repositories at about 61% of task completion.

Example:

```
duplicate key value violates unique constraint "rpm_updatecollectionname_name_update_record_id_6ef33bed_uniq"
```

This error repeats several times for various RHEL 7,8 and 9 repositories.

Please note that we can *NOT* provide a sosreport, logs or tracebacks from this customer, and Satellite is running in an air-gapped disconnected environment. 

Our support case is https://access.redhat.com/support/cases/#/case/03679066/

There have been other support cases from different customers where this exact database key is reporting an error ( rpm_updatecollectionname_name_update_record_id_6ef33bed_uniq ), and in all of them Red Hat support has recommended that they switch to using the Syncable Exports feature instead of actually resolving the issue.

We are on version 6.11 of Satellite, but it's notable that other support cases indicate that the issue is present on Satellite 6.13 too.

Other support cases that contain the rpm_updatecollectionname_name_update_record_id_6ef33bed_uniq error:
https://access.redhat.com/support/cases/#/case/03671664 ( Sat 6.12 )
https://access.redhat.com/support/cases/#/case/03670822 ( Sat 6.13 )



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

How reproducible:
Create large CV to export/import
After that succeeds, create incremental export and try to import that version of CV


Actual results:
duplicate key value violates unique constraint "rpm_updatecollectionname_name_update_record_id_6ef33bed_uniq"


Expected results:
Incremental Content View imports successfully 

Additional info:

Comment 1 Brenden Wood 2023-12-07 01:45:23 UTC
Adding this note from internal Slack discussion so it can be referenced later if need be:

The errors in my traceback say they are for:
`pulp_rpm/copy.py` line 223
`pulp_rpm/repository.py` lines 1017, 312
`pulp_rpm/advisory.py` lines 136, 314, 218, 206, 329 

Then some others in:
`django/django_lifecycle/mixins.py` line 134
`django/db/models/base.py` lines 739, 776, 881, 919
`django/db/models/manager.py` line 85
`django/db/models/query.py` line 1270
`django/db/models/sql/compiler.py` line 1416
`django/db/backends/utils.py` lines 66, 84, 75, 90

Comment 15 Robin Chan 2024-02-09 16:04:45 UTC
The Pulp upstream bug status is at closed. Updating the external tracker on this bug.

Comment 16 Robin Chan 2024-02-09 16:04:48 UTC
All upstream Pulp bugs are at MODIFIED+. Moving this bug to POST.

Comment 18 Ian Ballou 2024-02-21 21:15:44 UTC
Created attachment 2018063 [details]
RHEL 8 Hotfix RPM for Satellite 6.11.5.6

INSTALL INSTRUCTIONS (Satellite 6.11.5.6 on RHEL8):

1. Take a complete backup or snapshot of Satellite 6.11.5.6 server

2. Obtain the Hotfix RPM from this attachment

3. # dnf install ./python38-pulp-rpm-3.17.22-1.HOTFIXRHBZ2253381.el8pc.noarch.rpm --disableplugin=foreman-protector

4. # satellite-maintain service restart

Comment 20 Ian Ballou 2024-02-21 21:21:54 UTC
Created attachment 2018064 [details]
RHEL 7 Hotfix RPM for Satellite 6.11.5.6


INSTALL INSTRUCTIONS (Satellite 6.11.5.6 on RHEL7):

1. Take a complete backup or snapshot of Satellite 6.11.5.6 server

2. Obtain the Hotfix RPM from this attachment

3. # yum install ./tfm-pulpcore-python3-pulp-rpm-3.17.22-1.HOTFIXRHBZ2253381.el7pc.noarch.rpm --disableplugin=foreman-protector

4. # satellite-maintain service restart

Comment 21 wclark 2024-02-26 22:35:43 UTC
Created attachment 2019044 [details]
Hotfix RPM for Satellite 6.14.2

INSTALL INSTRUCTIONS

1. Take a complete backup or snapshot of Satellite 6.14.2 server

2. Obtain the Hotfix RPM from this attachment

3. # dnf install ./python39-pulp-rpm-3.19.11-3.HOTFIXRHBZ2253381.el8pc.noarch.rpm --disableplugin=foreman-protector

4. # satellite-maintain service restart

Comment 25 sganar 2024-03-08 11:44:02 UTC
Verified.

Tested on Satellite 6.15.0 Snap 10.1
python3.11-pulp-rpm-3.23.3-1.el8pc.noarch

Steps followed: 
1. Enable some repos, and sync them with the immediate download policy
2. Create a CV add the repos and publish it
3. Export complete the CV
4. Enable and sync some more repos, add them to the CV and publish it
5. Export the CV - incremental
6. Try to import the CV - complete and then incremental

Observation:
1. Content export was successful and no issues were observed
2. Content import was Successful and no issues were observed

Comment 30 errata-xmlrpc 2024-04-23 17:16:06 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.15.0 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-2024:2010


Note You need to log in before you can comment on or make changes to this bug.