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 2164551

Summary: Remove orphans task going to the paused state with error "Cannot delete some instances of model 'Repository' because they are referenced through protected foreign keys" on Red Hat Satellite 6.12
Product: Red Hat Satellite Reporter: Puja Singh <pujsingh>
Component: RepositoriesAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.12.0CC: ahumbe, dalley, dkliban, ggainey, ipanova, rchan
Target Milestone: UnspecifiedKeywords: Triaged
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-08-21 18:22:37 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 Puja Singh 2023-01-25 18:03:44 UTC
Description of problem:

The task 'Actions::Katello::OrphanCleanup::RemoveOrphans' is going to the paused state instead of finishing successfully.

Version-Release number of selected component (if applicable):
Satellite 6.12

How reproducible:
100%

Steps to Reproduce:
1. Enable and sync repositories on the Satellite server.
2. Sync Library env with Capsule server.
2. Remove some of the synced repositories.
3. Run orphan cleanup command foreman-rake katello:delete_orphaned_content RAILS_ENV=production

Actual results:
The task goes to the paused state with error message:

Katello::Errors::Pulp3Error

("Cannot delete some instances of model 'Repository' because they are referenced through protected foreign keys: 'Addon.repository', 'RpmRepository.repository_ptr'.", {})

Expected results:
The task should complete successfully without any issues.

Comment 1 Brad Buckingham 2023-01-26 15:09:00 UTC
Can you paste the stack trace of the pulp error observed?

Comment 11 Daniel Alley 2023-08-01 01:00:53 UTC
Reducing priority / sev given the case is closed and we have no reproducer available.

Comment 12 Grant Gainey 2023-08-21 13:38:05 UTC
Can't be in POST yet, PR isn't merged/backported

Comment 13 Ina Panova 2023-08-21 18:12:19 UTC
I am suggesting to remove the associated pulp upstream issue because there is no evidence the error is related to the pulp orphan clean up code. Last what the customer has shared after the upgrade was a 403 error per https://bugzilla.redhat.com/show_bug.cgi?id=2164551#c4

I am also removing Pulp component until it's clear what's the traceback.

Comment 14 Daniel Alley 2023-08-21 18:22:37 UTC
I'm just going to close this.  As Ina mentioned there has also been some unrelated information attached here, and given the lack of a viable reproducer and months of silence from the original user, it's probably best to start fresh with a new BZ if it is ever encountered again.