Bug 1810250

Summary: Unable to delete repository - Content with ID could not be found
Product: Red Hat Satellite Reporter: Mike McCune <mmccune>
Component: Content ManagementAssignee: Jonathon Turel <jturel>
Status: CLOSED ERRATA QA Contact: Lai <ltran>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.6.0CC: egolov
Target Milestone: 6.8.0Keywords: Reopened, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-3.16.0-0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1832584 (view as bug list) Environment:
Last Closed: 2020-10-27 13:00:31 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 Mike McCune 2020-03-04 19:36:54 UTC
Due to unknown circumstances the data in Satellite may get in an inconsistent state which blocks deleting a repository via the UI or hammer, resulting in a Paused delete task with the error:

2020-03-04T17:19:44 [E|bac|] Content with ID "*************" could not be found. (Katello::Errors::CandlepinError)


The task then gets stuck in a Paused state and can only be completed by skipping the step that is stuck. We should change to a model where if it fails to delete the content in Candlepin, we do not fail the task and just skip that step and continue.

Comment 5 Justin Sherrill 2020-03-11 01:54:12 UTC
Connecting redmine issue https://projects.theforeman.org/issues/29316 from this bug

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

Comment 7 Mike McCune 2020-04-17 18:05:55 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 8 Lai 2020-06-02 18:29:08 UTC
Steps to retest:

1. Create a product
2. Create 2 custom repos and sync them
3. Content -> products -> <product_name>
4. Remove one custom repo created in step 2
5. Check task page
6. On CLI use hammer and run following command: hammer repository delete --id=<repo_id>

Expected result
step 5. Should show up as successfully delete repo and should show no errors.
Step 6. Running hammer repository list should not show deleted repo.

Actual:
step 5: Shows up as successfully deleted repo with no errors.
step 6: "Repository deleted" message shows up after deleting repo.  Deleted repo is not shown after running hammer list command.

Note: For step 6, I also checked on UI to see no errors showing up in task page.

Marking issue as verified in 6.8.0 snap 2.1

Comment 11 errata-xmlrpc 2020-10-27 13:00:31 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.8 release), 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-2020:4366