Bug 1989182

Summary: Capsule sync completes with "duplicate key value violates unique constraint "rpm_variant_variant_id_" error.
Product: Red Hat Satellite Reporter: Devendra Singh <desingh>
Component: PulpAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Devendra Singh <desingh>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.10.0CC: dalley, ggainey, jsherril, osousa, pcreech, rchan, saydas, ttereshc, vijsingh
Target Milestone: 6.10.0Keywords: Regression, Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: python-pulp-rpm-3.14.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-16 14:13:02 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 Devendra Singh 2021-08-02 15:45:14 UTC
Description of problem: Capsule sync completes with "duplicate key value violates unique constraint "rpm_variant_variant_id_" error.


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

How reproducible:
always

Steps to Reproduce:
1. Install satellite and capsule using 6.10 Snap11
2. Run capsule complete sync and gets below error.

duplicate key value violates unique constraint "rpm_variant_variant_id_uid_name_type_764da894_uniq"
DETAIL:  Key (variant_id, uid, name, type, packages, distribution_tree_id)=(Server, Server, Server, variant, Packages, 189d85d1-94d6-40bd-9062-a0a4c65ac84e) already exists.
duplicate key value violates unique constraint "rpm_variant_variant_id_uid_name_type_764da894_uniq"
DETAIL:  Key (variant_id, uid, name, type, packages, distribution_tree_id)=(Server, Server, Server, variant, Packages, 189d85d1-94d6-40bd-9062-a0a4c65ac84e) already exists.
duplicate key value violates unique constraint "rpm_variant_variant_id_uid_name_type_764da894_uniq"
DETAIL:  Key (variant_id, uid, name, type, packages, distribution_tree_id)=(Server, Server, Server, variant, Packages, 226b2b66-8716-408a-9c9b-95b325b63a1c) already exists.
duplicate key value violates unique constraint "rpm_variant_variant_id_uid_name_type_764da894_uniq"
DETAIL:  Key (variant_id, uid, name, type, packages, distribution_tree_id)=(Server, Server, Server, variant, Packages, 226b2b66-8716-408a-9c9b-95b325b63a1c) already exists.
duplicate key value violates unique constraint "rpm_variant_variant_id_uid_name_type_764da894_uniq"
DETAIL:  Key (variant_id, uid, name, type, packages, distribution_tree_id)=(Capsule, Capsule, Capsule, variant, Packages, c6c0be27-1d1b-4d62-99af-819bfe04f9b8) already exists.
duplicate key value violates unique constraint "rpm_variant_variant_id_uid_name_type_764da894_uniq"
DETAIL:  Key (variant_id, uid, name, type, packages, distribution_tree_id)=(Capsule, Capsule, Capsule, variant, Packages, c6c0be27-1d1b-4d62-99af-819bfe04f9b8) already exists.


Actual results:
Capsule sync failed with "duplicate key value violates unique constraint" error.

Expected results:
Capsule sync should be completed successfully

Additional info:

Comment 2 pulp-infra@redhat.com 2021-08-02 23:07:55 UTC
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.

Comment 3 pulp-infra@redhat.com 2021-08-02 23:07:56 UTC
The Pulp upstream bug priority is at High. Updating the external tracker on this bug.

Comment 4 pulp-infra@redhat.com 2021-08-05 04:10:09 UTC
The Pulp upstream bug status is at ASSIGNED. Updating the external tracker on this bug.

Comment 5 pulp-infra@redhat.com 2021-08-05 14:18:21 UTC
The Pulp upstream bug status is at POST. Updating the external tracker on this bug.

Comment 8 pulp-infra@redhat.com 2021-08-19 22:06:58 UTC
The Pulp upstream bug status is at MODIFIED. Updating the external tracker on this bug.

Comment 9 pulp-infra@redhat.com 2021-08-19 23:08:14 UTC
All upstream Pulp bugs are at MODIFIED+. Moving this bug to POST.

Comment 10 pulp-infra@redhat.com 2021-08-23 21:07:00 UTC
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.

Comment 11 pulp-infra@redhat.com 2021-08-23 21:07:01 UTC
The Pulp upstream bug priority is at High. Updating the external tracker on this bug.

Comment 12 pulp-infra@redhat.com 2021-08-24 20:08:21 UTC
The Pulp upstream bug status is at MODIFIED. Updating the external tracker on this bug.

Comment 13 pulp-infra@redhat.com 2021-08-24 22:08:20 UTC
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.

Comment 14 Devendra Singh 2021-08-31 15:24:19 UTC
Verified on 6.10 Snap15

Verification points:

1- Prepared satellite and capsule and added rhel, tools, fm repositories.
2- Ran capsule complete sync it completed successfully.
3- Verified fixed in-version package.

# rpm -qa|grep python3-pulp-rpm-3.14.2-1
python3-pulp-rpm-3.14.2-1.el7pc.noarch

Comment 17 errata-xmlrpc 2021-11-16 14:13:02 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 (Moderate: Satellite 6.10 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-2021:4702