Bug 1338578

Summary: Failed to unregister content host on webUI (by virt-who)
Product: Red Hat Satellite Reporter: Liushihui <shihliu>
Component: WebUIAssignee: Partha Aji <paji>
WebUI sub component: Katello QA Contact: Katello QA List <katello-qa-list>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: unspecified CC: bbuckingham, bkearney, cwelton, gxing, hsun, mmccune, sgao, shihliu
Version: 6.2.0Keywords: Triaged
Target Milestone: UnspecifiedFlags: shihliu: needinfo+
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 11:32:43 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:
Attachments:
Description Flags
del-content-host-error
none
error_task.log none

Description Liushihui 2016-05-23 03:00:14 UTC
Description of problem:
Sometimes it failed to unregister content host on webUI, it will show error info "An error occured: undefined" 

Version-Release number of selected component (if applicable):
Satellite-6.2.0-RHEL-7-20160518
virt-who-0.17-1.el7.noarch
subscription-manager-1.17.6-1.el7.x86_64
python-rhsm-1.17.2-1.el7.x86_64

How reproducible:
30%

Steps to Reproduce:
1. Register system to satellite6.2
2. Configure virt-who run at esx mode and make sure virt-who send host/guest mapping info to satellite.
3. Open satellite webUI, go to Hosts-->Content hosts, choose the hypervisor, click on "Unregister Host" button, it will show an unregister option window:
If choose
"Completely deletes the host record and removes all reporting, provisioning, and configuration information."
===> It will show error info "An error occured: undefined"
If choose 
"Unregister the host as a subscription consumer. Provisioning and configuration information is preserved."
===> It will show error info "An error occured: Katello::Resources::Candlepin::CandlepinResource: 410 Gone {"displayMessage":"Unit fcdd6b17-911e-4e88-9385-f9bf79aea3a8 has been deleted","requestUuid":"321c60e4-a0af-4207-aba9-9793f668fddf","deletedId":"fcdd6b17-911e-4e88-9385-f9bf79aea3a8"} (GET /candlepin/consumers/fcdd6b17-911e-4e88-9385-f9bf79aea3a8/entitlements)", please see screenshot in attachment.

Actual results:
When choose the different unregister option, it will show different error info.  
Choose any option can't delete hypervisor

Expected results:
Choose any option, It should unregister content host successfully.

Additional info:
When occurred this problem, failed to unregister any content-host.

Comment 1 Liushihui 2016-05-23 03:03:00 UTC
Created attachment 1160433 [details]
del-content-host-error

Comment 3 Liushihui 2016-05-23 07:23:25 UTC
When it occurred this issue, check the task's error log in webUI. it will show 
"Exception:
RestClient::Gone: Katello::Resources::Candlepin::CandlepinResource: 410 Gone {"displayMessage":"Unit fcdd6b17-911e-4e88-9385-f9bf79aea3a8 has been deleted","requestUuid":"2ff4138f-c6cc-473e-bed0-c730301ace5a","deletedId":"fcdd6b17-911e-4e88-9385-f9bf79aea3a8"} (GET /candlepin/consumers/fcdd6b17-911e-4e88-9385-f9bf79aea3a8/entitlements)
"
Please see detail in attachment error_task.log

Comment 4 Liushihui 2016-05-23 07:23:43 UTC
Created attachment 1160469 [details]
error_task.log

Comment 6 Partha Aji 2016-06-17 21:49:39 UTC
I am not able to reproduce this error on my test instance. The stack trace pasted in the log files do not seem to correlate to the reported ""An error occured: undefined"". I am guessing that undefined was raised and a second unregister operation was tried. If we can get the original stack trace that would be great. I could not reproduce it in my local tests .. 

Markint is as Need Info. I would also recommend testing this on a more recent version of Sat.

Comment 8 Eko 2016-06-21 07:09:31 UTC
verified with Satellite-6.2.0-RHEL-7-20160620.0/

this issue can't be reproduced anymore, thanks.

Comment 9 Bryan Kearney 2016-07-27 11:32:43 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-2016:1501