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.
Description of problem:
******
downstream-only bug! do not clone. This is already fixed upstream via a larger refactor. Its very likely not worth cherrypicking the entire change for this.
******
In certain cases, users may have hosts that are registered in Katello but not Candlepin. This typically occurs due to bugs related to registration.
When this happens, the host cannot be removed from Katello. There is some code that checks for the host's entitlements, but if it gets a 404 from Candlepin, it will error with the following:
RestClient::ResourceNotFound: Katello::Resources::Candlepin::CandlepinResource: 404 Resource Not Found {"displayMessage":"Runtime Error RESTEASY001185: Could not find resource for relative : /consumers//entitlements of full path: https://localhost:8443/candlepin/consumers//entitlements at org.jboss.resteasy.core.registry.PathParamSegment.matchPattern:209","requestUuid":"e7511d96-c594-48b2-b572-f5cb1eddd579"} (GET /candlepin/consumers//entitlements)
Version-Release number of selected component (if applicable): 6.2.7
How reproducible: every time
Steps to Reproduce:
1. load database with affected records
2. attempt to delete host via foreman-rake console
Actual results: error
Expected results: successful unregister
Additional info:
Comment 4Satellite Program
2017-02-23 21:11:35 UTC
Please add verifications steps for this bug to help QE verify
repro steps:
NOTE: the repro steps involve causing some data corruption to occur!
* create fresh satellite, register one host
* log into postgres db (sudo su - postgres; psql candlepin)
* run this sql:
delete from cp_consumer_facts;
delete from cp_installed_products ;
delete from cp_consumer;
* now, attempt to delete host via web UI
without the patch, this will fail and the host will stick around. With the patch, you'll still get an error raised in the web UI, but the delete will succeed.
Verified in Satellite 6.2.9 Snap 2.
Followed the steps outlined in #5, but was more selective with the cp_consumer delete. The host deletion task still produced an error, as expected (see attached), however the host was deleted. To get past the paused deletion task, you can go into the dynflow console, skip the "Actions::Candlepin::Consumer::Destroy" step, then navigate back to the task and click resume.
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-2017:1191
Description of problem: ****** downstream-only bug! do not clone. This is already fixed upstream via a larger refactor. Its very likely not worth cherrypicking the entire change for this. ****** In certain cases, users may have hosts that are registered in Katello but not Candlepin. This typically occurs due to bugs related to registration. When this happens, the host cannot be removed from Katello. There is some code that checks for the host's entitlements, but if it gets a 404 from Candlepin, it will error with the following: RestClient::ResourceNotFound: Katello::Resources::Candlepin::CandlepinResource: 404 Resource Not Found {"displayMessage":"Runtime Error RESTEASY001185: Could not find resource for relative : /consumers//entitlements of full path: https://localhost:8443/candlepin/consumers//entitlements at org.jboss.resteasy.core.registry.PathParamSegment.matchPattern:209","requestUuid":"e7511d96-c594-48b2-b572-f5cb1eddd579"} (GET /candlepin/consumers//entitlements) Version-Release number of selected component (if applicable): 6.2.7 How reproducible: every time Steps to Reproduce: 1. load database with affected records 2. attempt to delete host via foreman-rake console Actual results: error Expected results: successful unregister Additional info: