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 1660497 - sometimes RHEL8 Beta sync fails: PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "katello_module_stream_artifacts_name_mod_stream_id_uniq"
Summary: sometimes RHEL8 Beta sync fails: PG::UniqueViolation: ERROR: duplicate key v...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Repositories
Version: 6.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.5.0
Assignee: John Mitsch
QA Contact: Jan Hutař
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-18 13:09 UTC by Jan Hutař
Modified: 2019-11-05 22:42 UTC (History)
3 users (show)

Fixed In Version: tfm-rubygem-katello-3.10.0.6-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-14 12:39:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
syn task which ended in stopped/warning -> Errors tab (23.42 KB, text/plain)
2018-12-18 13:11 UTC, Jan Hutař
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 25774 0 Normal Closed sometimes RHEL8 Beta sync fails: PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "katello_mo... 2020-07-09 01:31:11 UTC
Red Hat Product Errata RHSA-2019:1222 0 None None None 2019-05-14 12:39:46 UTC

Description Jan Hutař 2018-12-18 13:09:41 UTC
Description of problem:
sometimes RHEL8 Beta sync fails: PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint "katello_module_stream_artifacts_name_mod_stream_id_uniq"


Version-Release number of selected component (if applicable):
satellite-6.5.0-5.beta.el7sat.noarch (snap 8)


How reproducible:
sometimes


Steps to Reproduce:
1. I have started sync of these 4 repos:
   Content -> Sync Status
     Red Hat Enterprise Linux 8 for x86_64 - BaseOS Beta Kickstart
     Red Hat Enterprise Linux 8 for x86_64 - BaseOS Beta RPMs
     Red Hat Enterprise Linux 8 for x86_64 - AppStream Beta Kickstart
     Red Hat Enterprise Linux 8 for x86_64 - AppStream Beta RPMs
2. Other than that I have also same set of HTB repos enabled (but have not synced it yet)


Actual results:
One of sync tasks fails with warning:

PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint "katello_module_stream_artifacts_name_mod_stream_id_uniq"
DETAIL:  Key (module_stream_id, name)=(1, rust-doc-0:1.26.2-12.el8+2011+e949f8f2.x86_64) already exists.
: INSERT INTO "katello_module_stream_artifacts" ("module_stream_id", "name", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"

When I rerun sync on that single repo, it works.


Expected results:
Should work on a first try


Additional info:
# hammer repository list
---|-------------------------------------------------------------------|-----------------------------------------------------|--------------|---------------------------------------------------------------------------------
ID | NAME                                                              | PRODUCT                                             | CONTENT TYPE | URL                                                                             
---|-------------------------------------------------------------------|-----------------------------------------------------|--------------|---------------------------------------------------------------------------------
7  | bewsLYwxKsNPNwM                                                   | bUJpiBwSsPMrIlVzoVUq                                | puppet       | http://omaciel.fedorapeople.org/bagoftricks                                     
8  | eOwfdHsrBRDhQtR                                                   | IYdzksIZtvKGuEpERXSI                                | yum          | http://.../pulp/repos/Sat6-CI/QA/Tools_6_4_wi...
9  | FvbmrVdxxedikyl                                                   | FgiAEmNFKzOrTTalNzCB                                | yum          | http://.../pulp/repos/Sat6-CI/QA/Tools_6_4_wi...
3  | Red Hat Enterprise Linux 7 Server Kickstart x86_64 7.2            | Red Hat Enterprise Linux Server                     | yum          | https://cdn.redhat.com/content/dist/rhel/server/7/7.2/x86_64/kickstart          
2  | Red Hat Enterprise Linux 7 Server Kickstart x86_64 7.6            | Red Hat Enterprise Linux Server                     | yum          | https://cdn.redhat.com/content/dist/rhel/server/7/7.6/x86_64/kickstart          
11 | Red Hat Enterprise Linux 7 Server - RH Common RPMs x86_64 7Server | Red Hat Enterprise Linux Server                     | yum          | https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/rh-common/os   
1  | Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server             | Red Hat Enterprise Linux Server                     | yum          | https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/os             
34 | Red Hat Enterprise Linux 8 for x86_64 - AppStream Beta Kickstart  | Red Hat Enterprise Linux for x86_64 Beta            | yum          | https://cdn.redhat.com/content/beta/rhel8/8/x86_64/appstream/kickstart          
35 | Red Hat Enterprise Linux 8 for x86_64 - AppStream Beta RPMs       | Red Hat Enterprise Linux for x86_64 Beta            | yum          | https://cdn.redhat.com/content/beta/rhel8/8/x86_64/appstream/os                 
37 | Red Hat Enterprise Linux 8 for x86_64 - AppStream HTB Kickstart   | Red Hat Enterprise Linux for x86_64 High Touch Beta | yum          | https://cdn.redhat.com/content/htb/rhel8/8/x86_64/appstream/kickstart           
36 | Red Hat Enterprise Linux 8 for x86_64 - AppStream HTB RPMs        | Red Hat Enterprise Linux for x86_64 High Touch Beta | yum          | https://cdn.redhat.com/content/htb/rhel8/8/x86_64/appstream/os                  
30 | Red Hat Enterprise Linux 8 for x86_64 - BaseOS Beta Kickstart     | Red Hat Enterprise Linux for x86_64 Beta            | yum          | https://cdn.redhat.com/content/beta/rhel8/8/x86_64/baseos/kickstart             
31 | Red Hat Enterprise Linux 8 for x86_64 - BaseOS Beta RPMs          | Red Hat Enterprise Linux for x86_64 Beta            | yum          | https://cdn.redhat.com/content/beta/rhel8/8/x86_64/baseos/os                    
32 | Red Hat Enterprise Linux 8 for x86_64 - BaseOS HTB Kickstart      | Red Hat Enterprise Linux for x86_64 High Touch Beta | yum          | https://cdn.redhat.com/content/htb/rhel8/8/x86_64/baseos/kickstart              
33 | Red Hat Enterprise Linux 8 for x86_64 - BaseOS HTB RPMs           | Red Hat Enterprise Linux for x86_64 High Touch Beta | yum          | https://cdn.redhat.com/content/htb/rhel8/8/x86_64/baseos/os                     
4  | RHEL7Tools                                                        | SatTools                                            | yum          | http://.../pulp/repos/Sat6-CI/QA/Tools_6_5_wit...
5  | TRMVanFNECURUEI                                                   | gZfFSbDpIdqvCiIONCUz                                | puppet       | http://omaciel.fedorapeople.org/bagoftricks                                     
10 | WsAyENogqxdYngr                                                   | MVCNSxqFTRNtbmZZzaAN                                | puppet       | http://omaciel.fedorapeople.org/bagoftricks                                     
6  | ZFZgocwinzfDacu                                                   | dLYJwUtszyZjkyilOXhz                                | puppet       | http://omaciel.fedorapeople.org/bagoftricks                                     
---|-------------------------------------------------------------------|-----------------------------------------------------|--------------|---------------------------------------------------------------------------------

Comment 2 Jan Hutař 2018-12-18 13:11:06 UTC
Created attachment 1515336 [details]
syn task which ended in stopped/warning -> Errors tab

Comment 5 John Mitsch 2019-01-03 19:47:17 UTC
Created redmine issue https://projects.theforeman.org/issues/25774 from this bug

Comment 6 Bryan Kearney 2019-01-07 21:18:03 UTC
Upstream bug assigned to jomitsch

Comment 7 Bryan Kearney 2019-01-07 21:18:04 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25774 has been resolved.

Comment 12 errata-xmlrpc 2019-05-14 12:39:36 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, 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-2019:1222


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