Bug 2224738

Summary: Repository sync failed with error: PG::ForeignKeyViolation: ERROR: insert or update on table "katello_module_stream_rpms" violates foreign key constraint "katello_msrpm_rpm_id_fk" DETAIL: Key (rpm_id)=(116782) is not present in table "katello_rpms".
Product: Red Hat Satellite Reporter: Aniket <amahindr>
Component: RepositoriesAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: high Docs Contact:
Priority: high    
Version: 6.14.0CC: ahumbe, chiggins, rlavi
Target Milestone: 6.14.0Keywords: WorkAround
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-31 12:25:45 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:

Description Aniket 2023-07-22 15:24:13 UTC
Description of the problem:

I have enabled the following repositories and initiated a bulk sync:

Red Hat Enterprise Linux 8 for x86_64 - AppStream RPMs 8

Red Hat Enterprise Linux 8 for x86_64 - BaseOS RPMs 8

Red Hat Satellite Client 6 for RHEL 8 x86_64 RPMs


However, "Red Hat Enterprise Linux 8 for x86_64 - AppStream RPMs 8" failed with the following error message: 

~~~
PG::ForeignKeyViolation: ERROR:  insert or update on table "katello_module_stream_rpms" violates foreign key constraint "katello_msrpm_rpm_id_fk"
DETAIL:  Key (rpm_id)=(116782) is not present in table "katello_rpms".
~~~


Re-synchronizing 'Red Hat Enterprise Linux 8 for x86_64 - AppStream RPMs 8' resolved the issue.

Comment 1 Ashish Humbe 2023-07-27 04:54:34 UTC
This is a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=2224031

Comment 5 Ron Lavi 2023-07-31 12:25:45 UTC

*** This bug has been marked as a duplicate of bug 2224031 ***