Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 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 ***