Bug 2033321

Summary: Manifest refresh fails on Candlepin: One or more pools was left in an undefined state
Product: Red Hat Satellite Reporter: Jaroslav Krajicek <jkrajice>
Component: CandlepinAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.10.1CC: ahumbe, dsynk, jbittner, jjansky, nmoumoul, redakkan, tsaito
Target Milestone: 6.12.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: candlepin-4.0.15-1,candlepin-4.1.9-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2040250 (view as bug list) Environment:
Last Closed: 2022-11-16 13:33:03 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:
Bug Depends On:    
Bug Blocks: 2040250    
Attachments:
Description Flags
Error trace for `One or more pools was left in an undefined state` none

Description Jaroslav Krajicek 2021-12-16 14:09:33 UTC
Description of problem:
Satellite 6.10
  satellite-6.10.1-2.el7sat.noarch
  candlepin-4.0.9-1.el7sat.noarch

Manifest Refresh fails with
`org.candlepin.async.JobExecutionException: One or more pools was left in an undefined state: [8a8b8f..., 8a8b8f...]`

Adding subscriptions for the pool IDs resulted in ability to refresh manifest.
Subsequent removal of one went without issue, removing other fails on pool refresh that gets triggered by the removal.


Expected results:
Successful Manifest Refresh / Subscription removal

Additional info:
Attaching trace, please request further information as needed

Comment 1 Jaroslav Krajicek 2021-12-16 14:12:53 UTC
Created attachment 1846582 [details]
Error trace for `One or more pools was left in an undefined state`

Comment 4 Nikos Moumoulidis 2022-07-15 08:50:23 UTC
As mentioned before this bug needed a fix at two levels: the local (to Satellite) Candlepin component, and the Upstream/Hosted Candlepin behind customer portal.

The fix at the local candlepin level is available in versions candlepin-4.0.15-1 and candlepin-4.1.9-1,
and the Upstream/Hosted Candlepin fix is now live since July 11 at which point it got upgraded to candlepin-4.0.18 (from 3.2.22 before),
so moving this to MODIFIED.

For the fix to work you will likely need to create a new manifest allocation in the portal, before importing it to Satellite.

Comment 6 Griffin Sullivan 2022-08-18 14:28:08 UTC
Hello,

I did some work to reproduce what was going on with the Satellite in this BZ.

1) Create Product and add a repo
2) Check that the product has a product_uuid in cp_pool table in candlepin DB (copy this uuid)
3) Make an update to the Product like changing the name
4) Check cp_pool table to see the product_uuid has changed
5) Manually update the cp_pool table to change the product_uuid to the original uuid from step 2
6) Import a manifest or refresh an existing manifest

I see this error in the candlepin error logs:

ERROR org.candlepin.controller.CandlepinPoolManager - One or more pools references a product which no longer belongs to its organization: [8a81829982a25c1c0182accd5ba50e85]


Is this the expected result or should the manifest import / refresh run successfully?

Comment 7 Griffin Sullivan 2022-08-29 17:35:24 UTC
Verified in 6.12 snap 8

More precise error message when product pool IDs collide in Candlepin.

Steps to Reproduce:

See https://bugzilla.redhat.com/show_bug.cgi?id=2033321#c6

Expected Results:

Error message stating pools reference a product that does not belong to that organization.

Actual Results:

Error message stating pools reference a product that does not belong to that organization.


Notes:

There will be more updates to Candlepin to resolve these errors in the future. Verifying that this error message can guide the user to the problem is sufficient for now.

Comment 12 errata-xmlrpc 2022-11-16 13:33: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 (Important: Satellite 6.12 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-2022:8506

Comment 13 Red Hat Bugzilla 2023-09-18 04:29:25 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days