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 2221291 - Sat 6.14 is slow to sync and index repositories
Summary: Sat 6.14 is slow to sync and index repositories
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Repositories
Version: 6.14.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.14.0
Assignee: Samir Jha
QA Contact: Sam Bible
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-07 18:54 UTC by Samir Jha
Modified: 2023-11-08 14:20 UTC (History)
4 users (show)

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


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 36563 0 Urgent Ready For Testing 4.9 is slow to sync and index repositories 2023-07-10 12:17:17 UTC
Red Hat Issue Tracker SAT-18836 0 None None None 2023-07-07 18:56:56 UTC
Red Hat Product Errata RHSA-2023:6818 0 None None None 2023-11-08 14:20:08 UTC

Description Samir Jha 2023-07-07 18:54:35 UTC
We have new logic dueing repo indexing which looks for orphaned content units after sync and tries to delete them. However, this introduces a lot of slowness in syncs in env with a large number of content units.

https://community.theforeman.org/t/katello-4-9-is-very-slow/34038/9

We need to optimize this operation:
https://github.com/Katello/katello/blob/f9bf7d0065c55e202275de84b9c69b5ebbca9ed0/app/models/katello/repository.rb#L938

and possibly scope it by repo being synced or call this as an async task in finalize to not impact sync performance.

Please clone and make sure we have this flow downstream.

Comment 1 Samir Jha 2023-07-07 18:54:39 UTC
Created from redmine issue https://projects.theforeman.org/issues/36563

Comment 2 Samir Jha 2023-07-07 18:54:42 UTC
Upstream bug assigned to None

Comment 3 Brad Buckingham 2023-07-12 18:29:34 UTC
Moving to POST as upstream PR merged. :)

Comment 5 Sam Bible 2023-07-20 18:45:11 UTC
Verified on: 6.14 - Snap 8

Steps to verify:
1. Spin up 2 Satellite Instances, one of Snap 8, and another of an earlier Snap, like 5
2. Following the instructions here: https://github.com/Katello/katello/pull/10638, create large amount of orphaned content on both Satellites
2. Enable Red Hat Satellite Client 6 for RHEL 8 x86_64 RPMs on both instances.
3. Sync this repo on both instances.

Expected Results:
The repo should sync almost immediately (5seconds) on the newer Satellite, and take a long time (10 mins) on the other Satellite, as it's also cleaning up the Orphaned Content
Checking Katello::Rpm.count in foreman-rake console on both instances should show that the orphaned content created in step 2 is still present on the newer Satellite.

Actual Results:
The repo syncs almost immediately on the newer Satellite, and takes a long time on the other Satellite, as it's also cleaning up the Orphaned Content
Katello::Rpm.count shows that the orphaned content is still present on the newer Satellite.

Comment 8 errata-xmlrpc 2023-11-08 14:19:54 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.