Bug 1022198

Summary: Suggested quantity displayed on GUI is not correct
Product: Red Hat Enterprise Linux 7 Reporter: Sharath Dwaral <fsharath>
Component: subscription-managerAssignee: Carter Kozak <ckozak>
Status: CLOSED CURRENTRELEASE QA Contact: John Sefler <jsefler>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: bkearney, ckozak, jgalipea, jmolet, jsefler
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 11:19:39 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: 863175    
Attachments:
Description Flags
wrong suggested quantity displayed
none
quantity displayed correctly none

Description Sharath Dwaral 2013-10-22 16:56:57 UTC
Created attachment 815099 [details]
wrong suggested quantity displayed

Description of problem:
Suggested quantity displayed on GUI is not correct

Version-Release number of selected component (if applicable):
# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.8.29-1
subscription-manager: 1.9.11-1.el6
python-rhsm: 1.9.6-1.el6

How reproducible:
Always

Steps to Reproduce:

Perform the test against standalone candlepin

1. Set sockets to 20

# subscription-manager facts --list | grep socket
cpu.cpu_socket(s): 20

2. Subscribe to appropriate subscriptions so that cores are satisfied. In this case 2 of "Multi-Attribute Stackable (16 cores, 4 sockets, 8GB RAM)" provides 32 cores which satisfies cores requirement

# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Multi-Attribute Stackable (16 cores, 4 sockets, 8GB RAM)
Provides:          Multi-Attribute Limited Product
SKU:               sock-core-ram-multiattr
Contract:          4
Account:           12331131231
Serial:            3839311457533598282
Pool ID:           8a8d01e041bc9f420141bc9fb6b606ba
Active:            True
Quantity Used:     2
Service Level:     Super
Service Type:      Level 3
Status Details:    Only covers 8 of 20 sockets.
Starts:            10/14/2013
Ends:              10/14/2014
System Type:       Physical

3. From the data about we can see that 8 out of 20 sockets are covered. Go to All available subscriptions in GUI and check the suggested quantity for subscription that provides 2-sockets. In this case  "Multi-Attribute Stackable (2 sockets)"

This subscriptions has two pools which provide 5 and 10 subscriptions respectively. The suggested quantity displays only 5 even thought there is a pool of 10 which can provide the necessary 6 subscriptions.  (See attachment)

Actual results:
Suggested quantity displayed as 5 instead of 6

Expected results:
Suggested quantity should be 6

Additional info:

Comment 2 Carter Kozak 2013-11-05 18:25:51 UTC
commit f07385c6fda81176e6ac4352313d9228c2b7963a
Author: ckozak <ckozak>
Date:   Mon Nov 4 15:36:42 2013 -0500

    1022198: Display highest suggested quantity in contract selection
    
    We group similar pools together in the gui.  Because we only
    match similar pools, it doesn't matter which pool we read
    attributes from.  However the suggested quantity is based
    upon the available quantity, which varries by pool, so
    we should display the highest number.


Note: this does not fix the suggested quantity when it requires more than the maximum available quantity from either pool.

Comment 4 Sharath Dwaral 2013-11-08 19:59:37 UTC
Created attachment 821746 [details]
quantity displayed correctly

Version:

# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.8.31-1
subscription-manager: 1.10.6-1.el7
python-rhsm: 1.10.6-1.el7


Verification:

1. # subscription-manager facts --list | grep "_socket(s)"
cpu.cpu_socket(s): 20

2. # subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Multi-Attribute Stackable (16 cores, 4 sockets, 8GB RAM)
Provides:          Multi-Attribute Limited Product
SKU:               sock-core-ram-multiattr
Contract:          3
Account:           12331131231
Serial:            5959776048101648187
Pool ID:           8a8d01e04238017101423801ef0404e2
Active:            True
Quantity Used:     2
Service Level:     Super
Service Type:      Level 3
Status Details:    Only covers 8 of 20 sockets.   <--  PARTIAL SUBSCRIPTION
Starts:            11/07/2013
Ends:              11/07/2014
System Type:       Physical

3. See attachment for verification

VERIFIED

Comment 6 Ludek Smid 2014-06-13 11:19:39 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.