Bug 2080336

Summary: duplicate key value violates unique constraint "core_repositorycontent_repository_id_content_id_df902e11_uniq"
Product: Red Hat Satellite Reporter: Brad Buckingham <bbuckingham>
Component: PulpAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Lai <ltran>
Severity: medium Docs Contact:
Priority: high    
Version: 6.10.1CC: ahumbe, ankulkar, bbuckingham, brstephe, dalley, dkliban, dmule, egolov, ggainey, hyu, jalviso, jbhatia, JONATHAN.SATTELBERGER, jpasqual, matthew.lesieur, msunil, onerleka, osousa, pmoravec, pwallend, rchan, sadas, satellite6-bugs, saydas, smajumda, stanislav.moravec, sussen, vdeshpan, wclark
Target Milestone: 6.10.6Keywords: PrioBumpGSS, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pulpcore-3.14.15-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2044631 Environment:
Last Closed: 2022-05-31 15:19:38 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 2 Lai 2022-05-17 19:48:39 UTC
Steps to verify:
1) Create a content view and attach "Red Hat Satellite Tools 6.10 for RHEL 7 Server RPMs x86_64" repo.
2) Create a package include filter.
3) In the package filter:
   a) Add 2 rules to include 'foreman-cli' and 'katello-agent' rpms.

4) Publish the content view. CV version 1.0 should have the following 2 rpms:

  - foreman-cli
  - katello-agent

5) Amend the package filter:
  a) Add 1 rule to include 'katello-host-tools' rpm.

6) Publish the content view again. CV version 2.0 should have the following 3 rpms:

  - foreman-cli
  - katello-agent
  - katello-host-tools

7) Amend the package filter:
   a) Remove 2 rules that included 'foreman-cli' and 'katello-agent'.
   b) Add 1 rule to include 'katello-host-tools-fact-plugin' rpm.

8) Publish the content view again. CV version 3.0 should have the following 2 rpms:

  - katello-host-tools
  - katello-host-tools-fact-plugin

9) Amend the package filter:
  a) Add 2 rules to include 'foreman-cli' and 'katello-agent' rpms. 

10) Publish the content view again. CV version 4.0 should have the following 4 rpms:

  - foreman-cli
  - katello-agent
  - katello-host-tools
  - katello-host-tools-fact-plugin


11) Manually trigger a clean orphan task. Wait until the task is finished in Web UI -> Monitor -> Task page.

foreman-rake katello:delete_orphaned_content

12) Amend the package filter:
  a) Remove 2 rules that included 'foreman-cli' and 'katello-agent'.


13) Tail the /var/log/messages file

tail -f /var/log/messages


14) Publish the content view again.

Expected:
There should be no errors in the log and the cv should exclude 'foreman-cli' and 'katello-agent'

Actual results:
There isn't any errors in the log and the cv does exclude the 'foreman-cli' and 'katello-agent' packages.  Only 'katello-host-tools' and 'katello-hosts-tools-fact-plugin' remains as expected.

Verified on 6.10.6 snap 2 with python3-pulpcore-3.14.15-1.el7pc.noarch

Comment 7 errata-xmlrpc 2022-05-31 15:19:38 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 (Satellite 6.10.6 Async Bug Fix Update), 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/RHBA-2022:4850

Comment 8 pulp-infra@redhat.com 2022-06-06 08:25:49 UTC
The Pulp upstream bug status is at closed. Updating the external tracker on this bug.

Comment 9 pulp-infra@redhat.com 2022-06-06 10:27:47 UTC
The Pulp upstream bug status is at closed. Updating the external tracker on this bug.

Comment 10 pulp-infra@redhat.com 2022-06-06 12:45:09 UTC
The Pulp upstream bug status is at closed. Updating the external tracker on this bug.

Comment 11 pulp-infra@redhat.com 2022-06-13 04:48:48 UTC
The Pulp upstream bug status is at closed. Updating the external tracker on this bug.

Comment 12 pulp-infra@redhat.com 2022-06-16 15:24:22 UTC
The Pulp upstream bug status is at closed. Updating the external tracker on this bug.