Bug 1016615

Summary: Quantity on the All Available Subscriptions tab is not considering all contracts
Product: Red Hat Enterprise Linux 7 Reporter: Shwetha Kallesh <skallesh>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED NOTABUG QA Contact: John Sefler <jsefler>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: ckozak
Target Milestone: rc   
Target Release: 7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-06 17:34:25 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:
Bug Depends On:    
Bug Blocks: 863175    
Attachments:
Description Flags
All available subscriptions Tab
none
Contract selection dialogue none

Description Shwetha Kallesh 2013-10-08 12:13:19 UTC
Created attachment 809243 [details]
All available subscriptions Tab

Description of problem:
Quantity on the All Available Subscriptions tab is not considering all contracts

Version-Release number of selected component (if applicable):
[root@localhost product]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.8.29-1
subscription-manager: 1.10.3-1.git.0.c59a391.el7
python-rhsm: 1.10.3-1.git.0.6ac2883.el7


How reproducible:


Steps to Reproduce:
1.[root@localhost product]# subscription-manager list --avail --match-installed 
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name: Awesome OS for x86_64
Provides:          Awesome OS for x86_64 Bits
SKU:               awesomeos-x86_64
Pool ID:           8ac6a3a24197e65a014197e715310d56
Available:         10
Suggested:         10
Service Level:     
Service Type:      
Multi-Entitlement: Yes
Ends:              10/08/2014
System Type:       Physical

Subscription Name: Awesome OS for x86_64
Provides:          Awesome OS for x86_64 Bits
SKU:               awesomeos-x86_64
Pool ID:           8ac6a3a24197e65a014197e71b9d1016
Available:         5
Suggested:         5
Service Level:     
Service Type:      
Multi-Entitlement: Yes
Ends:              10/08/2014
System Type:       Physical

[root@localhost product]# subscription-manager attach --pool 8ac6a3a24197e65a014197e71b9d1016 --quantity 2
Successfully attached a subscription for: Awesome OS for x86_64


PS: Attachment

Actual results:


Expected results:


Additional info:

Comment 1 Shwetha Kallesh 2013-10-08 12:14:15 UTC
Created attachment 809244 [details]
Contract selection dialogue

Comment 2 Shwetha Kallesh 2013-10-08 12:15:44 UTC
Expected results: Quantity column should consider all the contracts and should display quantity as 13

Comment 4 Carter Kozak 2013-11-06 17:34:25 UTC
I don't think this is a bug.  I don't think it is particularly clear either.  The suggested quantity is a value for "How many of this pool should I attach."

There is no good way right now for us to give a suggested quantity for one pool based on the assumption that the consumer is also attaching another.

If I see that output, I attach the suggested quantity from one pool.  Once I have made the bind, the suggested quantity of the other pool can change to be more correct for my system, assuming the subscriptions are stackable.

This IS taken into account if you run
subscription-manager attach --pool 8ac6a3a24197e65a014197e715310d56 --pool 8ac6a3a24197e65a014197e71b9d1016

We attach quantity 10 from the first, and 3 from the second, in order to make the system fully compliant.

If you have multiple  available pools, we cannot suggest more quantity than is available, and we cannot suggest a lower quantity for another pool on the assumption that the first will be bound to the system.

Please let me know if you would like more information, or think this should be re-opened.