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 1418455 - unable to unregister host if candlepin record is missing
Summary: unable to unregister host if candlepin record is missing
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hosts
Version: 6.2.7
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: Unspecified
Assignee: Chris Duryee
QA Contact: jcallaha
URL:
Whiteboard:
Depends On: 1419985
Blocks: 1426417
TreeView+ depends on / blocked
 
Reported: 2017-02-01 21:28 UTC by Chris Duryee
Modified: 2024-10-01 16:04 UTC (History)
19 users (show)

Fixed In Version: tfm-rubygem-katello-3.0.0.115-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1426417 (view as bug list)
Environment:
Last Closed: 2017-05-01 13:58:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
verification screenshot (51.77 KB, image/png)
2017-04-10 17:45 UTC, jcallaha
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2991221 0 None None None 2017-04-04 09:51:58 UTC
Red Hat Product Errata RHBA-2017:1191 0 normal SHIPPED_LIVE Satellite 6.2.9 Async Bug Release 2017-05-01 17:49:42 UTC

Description Chris Duryee 2017-02-01 21:28:21 UTC
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 4 Satellite Program 2017-02-23 21:11:35 UTC
Please add verifications steps for this bug to help QE verify

Comment 5 Chris Duryee 2017-03-01 18:03:59 UTC
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.

Comment 12 jcallaha 2017-04-10 17:44:50 UTC
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.

Comment 13 jcallaha 2017-04-10 17:45:47 UTC
Created attachment 1270547 [details]
verification screenshot

Comment 14 satish sherkar 2017-04-24 21:33:13 UTC
Hello Team,

Is there any workaround for this?

Comment 15 Nithin Thomas 2017-04-25 01:31:24 UTC
Hi Satish,

Please refer the below KCS:
==> https://access.redhat.com/solutions/2991221

Regards,
Nithin

Comment 18 errata-xmlrpc 2017-05-01 13:58:50 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-2017:1191


Note You need to log in before you can comment on or make changes to this bug.