Bug 2080336 - duplicate key value violates unique constraint "core_repositorycontent_repository_id_content_id_df902e11_uniq"
Summary: duplicate key value violates unique constraint "core_repositorycontent_reposi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Pulp
Version: 6.10.1
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: 6.10.6
Assignee: satellite6-bugs
QA Contact: Lai
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-04-29 13:24 UTC by Brad Buckingham
Modified: 2022-09-21 15:10 UTC (History)
29 users (show)

Fixed In Version: pulpcore-3.14.15-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2044631
Environment:
Last Closed: 2022-05-31 15:19:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github pulp pulpcore issues 2047 0 None Closed Duplicate key error during pulpcore.app.tasks.repository.add_and_remove 2022-06-17 13:36:42 UTC
Red Hat Knowledge Base (Solution) 6909561 0 None None None 2022-04-29 13:24:59 UTC
Red Hat Product Errata RHBA-2022:4850 0 None None None 2022-05-31 15:19:49 UTC

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.


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