Bug 1652885

Summary: [Modularity][RHEL8]- RHEL8 HBT repo sync are failed to sync module streams
Product: Red Hat Satellite Reporter: Omkar Khatavkar <okhatavk>
Component: RepositoriesAssignee: John Mitsch <jomitsch>
Status: CLOSED ERRATA QA Contact: Omkar Khatavkar <okhatavk>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.5.0CC: jcallaha, jomitsch, mpusater, okhatavk, sghai, swadeley
Target Milestone: 6.5.0Keywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-14 12:39:05 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:
Attachments:
Description Flags
repo)sync.log none

Description Omkar Khatavkar 2018-11-23 12:01:51 UTC
Description of problem:
RHEL8 HBT repo sync is failed to sync module streams. This is happening with currently with repo 'Red Hat Enterprise Linux 8 for x86_64 - AppStream HTB RPMs'.
Works well with repo 'Red Hat Enterprise Linux 8 for x86_64 - AppStream HTB Kickstart'

Version-Release number of selected component (if applicable):
Satellite 6.5.4

How reproducible:
Not always only the first time, but module streams are never shown 

Steps to Reproduce:
1.Upload the RHEL8 manifest with HBT 
2. Add repos 'Red Hat Enterprise Linux 8 for x86_64 - AppStream HTB Kickstart' and  'Red Hat Enterprise Linux 8 for x86_64 - AppStream HTB RPMs'
3. now sync the repos.


Actual results:
Syncing for repo 'Red Hat Enterprise Linux 8 for x86_64 - AppStream HTB RPMs'
failed for module stream with an error 

Expected results:
Sync should work and module stream count should be displayed

Additional info:
Error Seen 

PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint "katello_module_stream_artifacts_name_mod_stream_id_uniq"
DETAIL:  Key (module_stream_id, name)=(213, libsodium-static-0:1.0.16-4.el8+2111+bbd4edaa.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"

Comment 2 Omkar Khatavkar 2018-11-23 12:02:56 UTC
Created attachment 1508262 [details]
repo)sync.log

Comment 4 John Mitsch 2018-11-29 21:53:29 UTC
I was able to find a manifest that works, though it had the actual RHEL8 beta rather than the HTB.

I tried syncing with both "Red Hat Enterprise Linux 8 for x86_64 - AppStream Beta Kickstart" and "Red Hat Enterprise Linux 8 for x86_64 - AppStream Beta RPMs". The sync tasks completed successfully.

If you try again with the actual beta's do you see the same issue?

Comment 5 John Mitsch 2018-11-30 20:32:56 UTC
I tried the HTB repos upstream and these both synced correctly:

Red Hat Enterprise Linux 8 for x86_64 - AppStream HTB Kickstart
Red Hat Enterprise Linux 8 for x86_64 - AppStream HTB RPMs

We just branched katello 3.10, which (iiuc) will be the base for the 6.5 builds. I'm guessing a change that will be in katello 3.10 is not in 3.9 (which 6.5 builds are currently based on). 

Can we check this again once the Satellite 6.5 builds are based on Katello 3.10? I can look further if that still fails, but since upstream is so close to 6.5 builds right now, it should be fixed in the upcoming Satellite builds.

Comment 6 Partha Aji 2018-12-03 15:23:15 UTC
*** Bug 1644007 has been marked as a duplicate of this bug. ***

Comment 7 Omkar Khatavkar 2018-12-04 07:24:59 UTC
Verified on Satellite with Snap 6.5.7 version. Repos are getting synced successfully. The issue is fixed now.

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