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 2224031 - Repository sync failed with error "ERROR: insert or update on table "katello_repository_rpms"
Summary: Repository sync failed with error "ERROR: insert or update on table "katello...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Repositories
Version: 6.14.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: 6.14.0
Assignee: Samir Jha
QA Contact: Cole Higgins
URL:
Whiteboard:
: 2224738 2226667 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-19 15:52 UTC by mithun kalyat
Modified: 2023-12-07 20:03 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-11-08 14:19:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SAT-19078 0 None None None 2023-07-20 15:01:51 UTC
Red Hat Product Errata RHSA-2023:6818 0 None None None 2023-11-08 14:20:05 UTC

Description mithun kalyat 2023-07-19 15:52:30 UTC
Description of problem:

I have enabled the following repositories and triggered sync for the first time on all 4 of them simultaneously.

Red Hat Enterprise Linux 8 for x86_64 - AppStream RPMs 8

Red Hat Enterprise Linux 8 for x86_64 - BaseOS RPMs 8

Red Hat Enterprise Linux 8 for x86_64 - AppStream Kickstart 8.7

Red Hat Enterprise Linux 8 for x86_64 - BaseOS Kickstart 8.7

Only 'Red Hat Enterprise Linux 8 for x86_64 - BaseOS RPMs 8' sync failed with the following error.

PG::ForeignKeyViolation: ERROR:  insert or update on table "katello_repository_rpms" violates foreign key constraint "fk_rails_39a260fd51"
DETAIL:  Key (rpm_id)=(5304) is not present in table "katello_rpms".

Res-sync of the above repository fixed the issue. I can't reproduce it for RHEL 9 same set repositories.

Comment 4 Ian Ballou 2023-07-25 20:53:10 UTC
I was able to reproduce it. It's on our board to fix. Adding 6.14.0+.

Comment 5 Ian Ballou 2023-07-25 20:54:57 UTC
I reproduced the issue by syncing 4 RHEL repos (RHEL 8 and RHEL 9 AppStream + BaseOS) at the same time like noted in the BZ description.

Comment 6 Ian Ballou 2023-07-25 20:56:23 UTC
Bumping priority since it's a sync blocker.

Comment 7 Samir Jha 2023-07-26 17:57:17 UTC
Looking at the error and failure in index action when reproducing, the reason the RPM might have been deleted before a RepositoryRPM is created as the error says is because we had a delete_orphan task being invoked in index_action which would delete all content which hadn't been associated to a repository. Looks like a race condition side effect from that.

We have removed delete_orphan from index action in snap 8 as part of this BZ: https://bugzilla.redhat.com/show_bug.cgi?id=2221291 so this should be resolved. Currently testing on a second snap 8 instance.

Comment 9 Ron Lavi 2023-07-31 12:25:45 UTC
*** Bug 2224738 has been marked as a duplicate of this bug. ***

Comment 13 Brad Buckingham 2023-08-11 12:02:56 UTC
*** Bug 2226667 has been marked as a duplicate of this bug. ***

Comment 17 errata-xmlrpc 2023-11-08 14:19:57 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 (Important: Satellite 6.14 security and bug fix update), 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-2023:6818


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