Bug #25774
Updated by John Mitsch about 6 years ago
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1660497 *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):* Katello 3.10 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 ---|-------------------------------------------------------------------|-----------------------------------------------------|--------------|---------------------------------------------------------------------------------