Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 841317

Summary: Systems ui page doesn't handle 410 nicely
Product: [Retired] Subscription Asset Manager Reporter: Jesus M. Rodriguez <jesusr>
Component: katelloAssignee: Tom McKay <tomckay>
Status: CLOSED ERRATA QA Contact: SAM QE List <sam-qe-list>
Severity: high Docs Contact:
Priority: high    
Version: 1.3CC: bkearney, jomara, mmccune, sthirugn, tomckay
Target Milestone: rcKeywords: Triaged
Target Release: 1.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 873805 996559 (view as bug list) Environment:
Last Closed: 2013-10-01 10:47:47 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: 833466, 873805, 996559    
Attachments:
Description Flags
410 error
none
spinning cursor
none
error log after clicking systems tab none

Description Jesus M. Rodriguez 2012-07-18 16:34:39 UTC
Created attachment 598935 [details]
410 error

Description of problem:

If you do a subscription-manager unregister, then a katello 'remove system' without a refresh of the screen. You get into a weird state. The UI gets a 410 error from Candlepin then spins.

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


How reproducible:
Hard to tell honestly. But to the best of my knowledge I did a subscription-manager unregister  and clicked removed system from the UI (I got impatient) :D

 
Actual results:
Katello systems page gets 410, then spins.

Expected results:
I expect it to get the 410, then remove its record based on the 410 error.

Additional info:

I also get get: Validation failed: Name has already been taken
when I try to migrate the system from RHN Hosted to SystemEngine. (After unregistering, I registered the client with RHN Hosted class) to test out my migration script.

Comment 1 Jesus M. Rodriguez 2012-07-18 16:35:30 UTC
Created attachment 598936 [details]
spinning cursor

Comment 3 Jesus M. Rodriguez 2012-07-18 16:37:50 UTC
katello-glue-foreman-0.1.311-1.el6_2.noarch
katello-all-0.1.311-1.el6_2.noarch
katello-cli-common-0.1.107-1.el6.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-glue-pulp-0.1.311-1.el6_2.noarch
katello-glue-candlepin-0.1.311-1.el6_2.noarch
katello-0.1.311-1.el6_2.noarch
katello-configure-0.1.107-1.el6.noarch
katello-cli-0.1.107-1.el6.noarch
katello-common-0.1.311-1.el6_2.noarch
katello-selinux-0.1.10-1.el6.noarch
katello-certs-tools-1.0.4-1.el6.noarch
katello-qpid-client-key-pair-1.0-1.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-glue-candlepin-0.1.311-1.el6_2.noarch
candlepin-0.5.26-1.el6.noarch
candlepin-tomcat6-0.5.26-1.el6.noarch

Comment 4 Jesus M. Rodriguez 2012-07-18 16:45:58 UTC
Created attachment 598938 [details]
error log after clicking systems tab

Comment 5 Tom McKay 2012-07-18 16:57:58 UTC
Leaves katello in unusable state, with the katello db out of sync with the candlepin db.

Fencing needs to be in place for handling when 410 come back from candlepin.

Comment 6 Jesus M. Rodriguez 2012-07-25 01:47:06 UTC
This also happens if you delete the consumer from Pulp by hand first. Then attempt to remove it from the UI. Katello will remove the consumer from Candlepin, then error out when it gets a 404 back from Pulp and just stops.

Comment 7 Jesus M. Rodriguez 2012-07-25 01:49:04 UTC
What I would expect is that if a remove system is in process, that Katello handle acceptable error codes from the subsystems: 404 or 410 from Candlepin. 404 from pulp, possibly a 404 from elasticsearch. The logic here is that if we're removing something and it's already gone or not found on the subsystems, then we proceed to make sure we're not in an unable state.

Comment 8 Jesus M. Rodriguez 2012-07-26 16:43:25 UTC
Apparently this happens even with a simple subscription-manager unregister.

Comment 9 Bryan Kearney 2012-08-07 16:46:13 UTC
Should be fixed by https://bugzilla.redhat.com/show_bug.cgi?id=843462

Comment 10 Tom McKay 2012-11-01 17:52:39 UTC
I have a scenario right now where a 410 is being returned by candlepin and the UI is not happy.

Comment 12 Mike McCune 2013-04-16 22:18:44 UTC
*** Bug 951217 has been marked as a duplicate of this bug. ***

Comment 13 Bryan Kearney 2013-06-07 12:49:17 UTC
I get a friendly error which says:

"Couldn't find System with id=4"

I can then refresh the page and it is ok. I am gonna send this to QA.

Comment 15 sthirugn@redhat.com 2013-08-13 19:25:17 UTC
Verified.  Ditto comments as in Comment 13 above.

I got a user message in SAM UI - "Couldn't find System with id=84" and refreshing the page after that removed the system.

Packages tested:
* candlepin-0.8.19-1.el6sam.noarch
* candlepin-scl-1-5.el6_4.noarch
* candlepin-scl-quartz-2.1.5-5.el6_4.noarch
* candlepin-scl-rhino-1.7R3-1.el6_4.noarch
* candlepin-scl-runtime-1-5.el6_4.noarch
* candlepin-selinux-0.8.19-1.el6sam.noarch
* candlepin-tomcat6-0.8.19-1.el6sam.noarch
* elasticsearch-0.19.9-8.el6sat.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.4.2-2.el6sat.noarch
* katello-cli-1.4.3-5.el6sat.noarch
* katello-cli-common-1.4.3-5.el6sat.noarch
* katello-common-1.4.3-6.el6sam_splice.noarch
* katello-configure-1.4.4-2.el6sat.noarch
* katello-glue-candlepin-1.4.3-6.el6sam_splice.noarch
* katello-glue-elasticsearch-1.4.3-6.el6sam_splice.noarch
* katello-headpin-1.4.3-6.el6sam_splice.noarch
* katello-headpin-all-1.4.3-6.el6sam_splice.noarch
* katello-selinux-1.4.4-2.el6sat.noarch
* thumbslug-0.0.32-1.el6sam.noarch
* thumbslug-selinux-0.0.32-1.el6sam.noarch

Comment 17 errata-xmlrpc 2013-10-01 10:47:47 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.

http://rhn.redhat.com/errata/RHEA-2013-1390.html