Bug 855257 - In "Choose the specific contract to use" dialog,total subscription is 5 ,where as quantity available is 15
In "Choose the specific contract to use" dialog,total subscription is 5 ,wher...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager (Show other bugs)
5.9
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Adrian Likins
Entitlement Bugs
:
Depends On:
Blocks: 771748
  Show dependency treegraph
 
Reported: 2012-09-07 02:49 EDT by Shwetha Kallesh
Modified: 2013-04-29 10:23 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-07 23:03:19 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Available subscription is more than the total (135.80 KB, image/png)
2012-09-07 02:49 EDT, Shwetha Kallesh
no flags Details
screenshot shows that the default quantities in the contract selection dialog are capped by their remaining quantity. (138.99 KB, image/png)
2012-10-15 15:32 EDT, John Sefler
no flags Details

  None (edit)
Description Shwetha Kallesh 2012-09-07 02:49:56 EDT
Created attachment 610635 [details]
Available subscription is more than the total

Description of problem:
In "Choose the specific contract to use" dialog,total subscription is 5 ,where as quantity available is 15 

Version-Release number of selected component (if applicable):
[root@unused ~]# rpm -qa | grep subscription-manager
subscription-manager-gui-1.0.17-1.el5
subscription-manager-firstboot-1.0.17-1.el5
subscription-manager-1.0.17-1.el5
subscription-manager-migration-1.0.17-1.el5
subscription-manager-migration-data-1.11-1.el5
subscription-manager-debuginfo-1.0.17-1.el5


How reproducible:


Steps to Reproduce:
1.Subscription-manager-gui
2.In All Available Subscriptions Tab,select a multi-entitled subscription
3.click on subscribe
  
Actual results:
In the Attachment

Expected results:
Maximum Quantity available for subscription should be equal to the Total 

Additional info:
Comment 1 Shwetha Kallesh 2012-09-07 03:23:13 EDT
Steps to Reproduce:
1.Subscription-manager-gui
2.In All Available Subscriptions Tab,select a multi-entitled subscription
3.Increase the quantity to max available
4.click on subscribe
Comment 2 Adrian Likins 2012-09-20 16:13:23 EDT
Looks like if you "click to adjust quantity" it will default to the right number in the spin button, so the info is there. 

Checking..
Comment 3 Adrian Likins 2012-10-05 16:17:47 EDT
(in master, to be cherry-picked)
commit cd74e008c7ec171c43d629c826b010a461f5897a
Author: Adrian Likins <alikins@redhat.com>
Date:   Wed Sep 26 17:08:36 2012 -0400

    855257: fix issues with default contract quantity being wrong
    
    Cap at quantity of pool from each contract instead of
    total request quantity.
Comment 4 RHEL Product and Program Management 2012-10-05 16:38:17 EDT
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.
Comment 6 John Sefler 2012-10-15 15:15:08 EDT
Using subscriptions from the imported TESTDATA to verify version...
[root@jsefler-rhel59 ~]# rpm -q subscription-manager-gui
subscription-manager-gui-1.0.22-1.el5


CREATE A FAKE FACTS FILE TO SIMULATE A 9 SOCKET SYSTEM....
[root@jsefler-rhel59 ~]# echo '{"cpu.cpu_socket(s)":9}' > /etc/rhsm/facts/fake.facts
[root@jsefler-rhel59 ~]# subscription-manager facts --list | grep cpu.cpu_socket
cpu.cpu_socket(s): 9
[root@jsefler-rhel59 ~]# 

[root@jsefler-rhel59 ~]# subscription-manager register --username testuser1 --org admin
Password: 
The system has been registered with id: 6934a42b-4718-49cc-9e1a-6df18ced6622 

SUBSCRIBE TO 2 OF THE POOLS SO THAT A QUANTITY OF 7 REMAINS NEEDED FOR SOCKET COMPLIANCE...
[root@jsefler-rhel59 ~]# subscription-manager list --avail | grep 8a90f81d3a61c156013a61c33f3e03b7 -A1 -B2
Subscription Name:    	Awesome OS for x86_64
SKU:                  	awesomeos-x86_64
Pool Id:              	8a90f81d3a61c156013a61c33f3e03b7
Quantity:             	10
[root@jsefler-rhel59 ~]# subscription-manager list --avail | grep 8a90f81d3a61c156013a61c33f0003ac -A1 -B2
Subscription Name:    	Awesome OS for x86_64
SKU:                  	awesomeos-x86_64
Pool Id:              	8a90f81d3a61c156013a61c33f0003ac
Quantity:             	5
[root@jsefler-rhel59 ~]# subscription-manager subscribe --pool 8a90f81d3a61c156013a61c33f3e03b7 --pool 8a90f81d3a61c156013a61c33f0003ac
Successfully consumed a subscription for: Awesome OS for x86_64
Successfully consumed a subscription for: Awesome OS for x86_64

START THE GUI AND GO TO THE AVAILABLE SUBSCRIPTIONS, CLICK UPDATE, UNCHECK THE "have no overlap with existing subscriptions" FILTER AND LOOK FOR "Awesome OS for x86_64".

NOW LOOK AT THE ATTACHED SCREEN WHERE WE SEE THAT THE DEFAULT QUANTITY IS CAPPED AT IT MAXIMUM AVAILABLE UNUSED QUANTITY (4) AND THE OTHER CONTRACT'S DEFAULT QUANTITY IS EXACTLY WHAT IS NEEDED TO SATISFY THE REMAINING SOCKETS (7) WHICH IS WITHIN THE AVAILABLE UNUSED QUANTITY LEFT ON THAT CONTRACT.
Comment 7 John Sefler 2012-10-15 15:32:04 EDT
Created attachment 627633 [details]
screenshot shows that the default quantities in the contract selection dialog are capped by their remaining quantity.
Comment 8 John Sefler 2012-10-15 15:32:52 EDT
Moving to VERIFIED
Comment 9 J.C. Molet 2012-10-15 16:05:54 EDT
This is a dupe of both Bug 760618 (closed WONTFIX, change of heart?) and "case 2" in Bug 766778 .
Comment 11 errata-xmlrpc 2013-01-07 23:03:19 EST
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/RHBA-2013-0033.html

Note You need to log in before you can comment on or make changes to this bug.