Bug 1321831

Summary: When consumer ID has been deleted, the Back button and Next button should be disabled in Attaching window.
Product: Red Hat Enterprise Linux 6 Reporter: qianzhan
Component: subscription-managerAssignee: William Poteat <wpoteat>
Status: CLOSED ERRATA QA Contact: John Sefler <jsefler>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.8CC: bcourt, csnyder, jgalipea, jstavel, skallesh, wpoteat
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1322979 (view as bug list) Environment:
Last Closed: 2017-03-21 10:54:59 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: 1322979    
Attachments:
Description Flags
invalid_installed_products.png
none
using-servicelevel_is_SLA.png
none
Showing_consumer_deleted.png
none
"Consumer has been deleted" error dialog none

Description qianzhan 2016-03-29 08:54:21 UTC
Description of problem:
When consumer ID has been deleted, the Back button and Next button should be disabled in Attaching window.

Version-Release number of selected component (if applicable):
subscription-manager: 1.16.8-7.el6
python-rhsm: 1.16.6-1.el6


How reproducible:
always

Steps to Reproduce:
1. Register RHEL-6.8-20160323.0 to SAM-1.4.1-RHEL-6-20141113.0.

2. Delete the consumer from server side.
 curl -k -u admin:admin --request DELETE https://samserv.redhat.com:443/sam/api/consumers/bfdd0e1f-7a61-439a-84c3-c7ea80ced400

3. Open subscription-manager-gui, and click Auto-attach. A warning window prompts to notice the consumer is deleted. Please see attachment 'Showing_consumer_deleted.png'

4. Click OK button on the warning window. And click Next button on attaching window. A Confirm Subscriptions window prompts with a confusing info:'Using service level: SLA'. Please see attachment 'using_servicelevel_is_SLA.png'.

5. Click Back button on Confirm Subscriptions window, then a Select Service Level window prompts with invalid products info. Please see attachment 'invalid_installed_products.png'



Actual results:
As step 4 and step 5.

Expected results:
From step 3 on, the Back button and Next button should be disabled in Attaching window, so the confusing info in step 4 and step5 can not be shown .

Additional info:

Comment 1 qianzhan 2016-03-29 08:59:37 UTC
Created attachment 1141143 [details]
invalid_installed_products.png

Comment 2 qianzhan 2016-03-29 09:00:12 UTC
Created attachment 1141144 [details]
using-servicelevel_is_SLA.png

Comment 3 qianzhan 2016-03-29 09:00:36 UTC
Created attachment 1141145 [details]
Showing_consumer_deleted.png

Comment 5 Chris Snyder 2016-04-21 19:00:04 UTC
Fixed in upstream master as of the commit below. As this is before the branch for 6.9 this fix should be included in the rebase. As such moving to modified (instead of post).

commit 1711b21a72523579ad45c7057cb338d7c8f5a901
Author: William Poteat <wpoteat>
Date:   Mon Apr 4 14:14:22 2016 -0400

    1321831: Clear auto-attach dialog when consumer has been deleted

Comment 8 qianzhan 2016-10-18 06:27:11 UTC
Will verify this bug when RHEL6.9 build comes out.

Comment 9 Shwetha Kallesh 2016-11-08 04:38:47 UTC
Created attachment 1218374 [details]
"Consumer has been deleted" error dialog

Marking bug as verified, no auto-attach window opens after clicking on the OK button of the error dialog "consumer has been deleted"

Comment 10 Shwetha Kallesh 2016-11-08 04:41:23 UTC
Marking bug as verified, no auto-attach window opens after clicking on the OK button of the error dialog "consumer has been deleted"

[root@dhcp35-71 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.0.19-1
subscription management rules: 5.20
subscription-manager: 1.18.3-1.el6
python-rhsm: 1.18.4-1.el6


[root@dhcp35-71 ~]# subscription-manager register --force
The system with UUID f622b5ce-2456-49ba-858a-9c134fe79c28 has been unregistered
Registering to: shwetha-workstation.usersys.redhat.com:8443/candlepin
Username: admin
Password: 
Organization: admin
The system has been registered with ID: 5ca38717-fb42-4636-888b-cbf71ad806a2 

Now delete the consumer: 
[root@dhcp35-71 ~]# curl -k -u admin:admin --request DELETE https://10.70.35.31:8443/candlepin/consumers/5ca38717-fb42-4636-888b-cbf71ad806a2

Open GUI and try to auto-attach

Please attachment for the error dialog "consumer has been deleted"

Comment 11 Jan Stavel 2016-11-10 21:08:50 UTC
I have automated this use case.

Comment 13 errata-xmlrpc 2017-03-21 10:54:59 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://rhn.redhat.com/errata/RHSA-2017-0698.html