Bug 1467598

Summary: subscription-manager-gui fails when the contractNumber is not present for a pool
Product: Red Hat Enterprise Linux 7 Reporter: Rehana <redakkan>
Component: subscription-managerAssignee: William Poteat <wpoteat>
Status: CLOSED NOTABUG QA Contact: John Sefler <jsefler>
Severity: low Docs Contact:
Priority: low    
Version: 7.4CC: jhnidek, khowell, redakkan, 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:
: 1468287 (view as bug list) Environment:
Last Closed: 2017-10-10 15:25:22 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
Error
none
No-Error none

Description Rehana 2017-07-04 10:13:25 UTC
Created attachment 1294154 [details]
Error

Description of problem:
Unable to get the contract selection window opened when try to attach the subscription from GUI 

Version-Release number of selected component (if applicable):
subscription-manager: 1.19.21-1.el7
python-rhsm: 1.19.9-1.el7


How reproducible:
always

Steps to Reproduce:
1.Register
2.go to "all available subscriptions" 
3.Select a subscription that has multiple contract 

Actual results:
Error appears (PFA: Error.png) 


Expected results:
contract selection window should appear

Additional info:

Comment 2 Rehana 2017-07-04 10:23:49 UTC
The above issue is reproducible only with particular subscription, i can launch the contract selection window by using a different subscriptions (PFA: No-Error.png)

Comment 3 Rehana 2017-07-04 10:24:24 UTC
Created attachment 1294157 [details]
No-Error

Comment 4 John Sefler 2017-07-05 15:00:31 UTC
Adding Info...
I can also reproduce the failure.  Notice that the Contract number appears empty for the subscription selected in the gui which should never be the case in production.

[root@jsefler-rhel7 ~]# subscription-manager list --avail --matches MCT0335
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name:   Red Hat Enterprise Linux AS, Standard
Provides:            Red Hat Beta
                     Red Hat Enterprise Linux Resilient Storage (for RHEL
                     Server)
                     Oracle Java (for RHEL Server)
                     Red Hat Enterprise Linux High Availability (for RHEL
                     Server)
                     Red Hat Enterprise Linux Server
                     Red Hat Software Collections Beta (for RHEL Server)
                     Red Hat Enterprise Linux Load Balancer (for RHEL Server)
                     Red Hat Hardware Certification Test Suite
SKU:                 MCT0335
Contract:                         <================ OBSERVER EMPTY/NULL 
Pool ID:             8a99f9815ccb50d9015d0cf99cec5c83
Provides Management: No
Available:           Unlimited
Suggested:           1
Service Level:       Standard
Service Type:        L1-L3
Subscription Type:   Standard
Ends:                07/18/2017
System Type:         Virtual

Subscription Name:   Red Hat Enterprise Linux AS, Standard
Provides:            Red Hat Beta
                     Red Hat Enterprise Linux Resilient Storage (for RHEL
                     Server)
                     Oracle Java (for RHEL Server)
                     Red Hat Enterprise Linux High Availability (for RHEL
                     Server)
                     Red Hat Enterprise Linux Server
                     Red Hat Software Collections Beta (for RHEL Server)
                     Red Hat Enterprise Linux Load Balancer (for RHEL Server)
                     Red Hat Hardware Certification Test Suite
SKU:                 MCT0335
Contract:                         <================ OBSERVER EMPTY/NULL 
Pool ID:             8a99f9815ccb50d9015d0cf99c565c80
Provides Management: No
Available:           4
Suggested:           1
Service Level:       Standard
Service Type:        L1-L3
Subscription Type:   Standard
Ends:                07/18/2017
System Type:         Physical

Comment 5 Kevin Howell 2017-07-06 14:56:40 UTC
This should not generally happen, but we should handle this case more gracefully in subscription-manager-gui.

Comment 7 Kevin Howell 2017-10-10 15:25:22 UTC
Unrealistic data, and the underlying problem has been fixed in candlepin, we're not making changes to subscription-manager for this.