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 1810270

Summary: file repo deletion is slow
Product: Red Hat Satellite Reporter: Justin Sherrill <jsherril>
Component: RepositoriesAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: Stephen Wadeley <swadeley>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.6.0CC: dgross, mmccune, swadeley, zhunting
Target Milestone: 6.7.1Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-3.14.0.21-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1814428 (view as bug list) Environment:
Last Closed: 2020-06-08 13:18:03 UTC Type: ---
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
1810270.patch none

Description Justin Sherrill 2020-03-04 20:27:11 UTC
The repository model is setup to delete associated units very quickly via :dependent => :delete_all

However for file units, this is missing.  This results in a very slow repo deletion with lots of units.

Comment 1 Justin Sherrill 2020-03-04 20:27:14 UTC
Created from redmine issue https://projects.theforeman.org/issues/29267

Comment 2 Justin Sherrill 2020-03-04 20:27:16 UTC
Upstream bug assigned to None

Comment 4 Bryan Kearney 2020-03-04 21:00:38 UTC
Upstream bug assigned to jsherril

Comment 5 Bryan Kearney 2020-03-04 21:00:40 UTC
Upstream bug assigned to jsherril

Comment 6 Bryan Kearney 2020-03-05 17:00:37 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/29267 has been resolved.

Comment 7 Mike McCune 2020-03-10 20:50:35 UTC
Created attachment 1669061 [details]
1810270.patch

** Satellite 6.6 Patch instructions **


1) Download 1810270.patch to your Satellite

2) copy to tfm-rubygem-katello subdir:

cp 1810270.patch `rpm -ql tfm-rubygem-katello | head -1`

3) cd `rpm -ql tfm-rubygem-katello | head -1`

4) patch:

patch -p1 < 1810270.patch

5) foreman-maintain service restart

6) remove repository via hammer or UI

Comment 8 Mike McCune 2020-04-17 18:05:43 UTC
*** 6.7.0 Hotfix available ***


1) Download hotfix rpm:

wget http://people.redhat.com/~mmccune/hotfix/tfm-rubygem-katello-3.14.0.20-2.HOTFIXRHBZ1810250RHBZ1810270.el7sat.noarch.rpm

to your Satellite.

2) Install:

rpm -Uvh tfm-rubygem-katello-3.14.0.20-2.HOTFIXRHBZ1810250RHBZ1810270.el7sat.noarch.rpm

3) restart:

satellite-maintain service restart

4) resume operations

Comment 21 errata-xmlrpc 2020-06-08 13:18:03 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/RHBA-2020:2422