Bug 745995

Summary: Subscription Assistant Quantity 0 If Future Entitled
Product: Red Hat Enterprise Linux 5 Reporter: Devan Goodwin <dgoodwin>
Component: subscription-managerAssignee: Michael Stead <mstead>
Status: CLOSED ERRATA QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.8CC: bkearney, jmolet, jsefler, lmiksik, mstead, wpoteat
Target Milestone: rc   
Target Release: 5.8   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
No description necessary
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-21 06:41:55 UTC Type: ---
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: 715031, 771700, 772019    
Attachments:
Description Flags
future quantity none

Description Devan Goodwin 2011-10-13 15:26:02 UTC
Description of problem:

If you subscribe to a multi-entitlement product with a start date in the future (you have no valid entitlements for right now), launching the subscription assistant your product will show up, but the quantity selector is set to 0.

Version-Release number of selected component (if applicable):

subscription-manager-0.97.1-1.git.87.ab33cf8.fc15.x86_64

How reproducible:

Very.

Steps to Reproduce:
1. Setup an installed product cert in /etc/pki/product, for our test data: 100000000000002.pem
2. Register and go to All Subscriptions tab. Search for today plus one year and a day.
3. Bind with quantity 2.
4. Now open Subscription Assistant with today's date. 
  
Actual results:

Our installed product correctly shows up as needing an entitlement, but if we select it, the quantity spinner by the subscription below is set to 0 by default.

Expected results:

It should be set to 2 (depending on cpu cores).

Additional info:

This likely indicates the code that calculates the quantity is not date aware, it's just checking all entitlement certs and assuming they're all valid for the date in question.

When fixing we need to make sure the quantity check code can work for dates in the future. Both subscription assistant and all subs tab allow you to search for a specific date, and then show you a quantity spinner.

Comment 3 Michael Stead 2011-12-15 18:30:18 UTC
Fixed in master branch: 5cb0d1317b34196c1fb34ab96b40b6eaa11d22ee

Comment 4 J.C. Molet 2011-12-16 18:49:32 UTC
Created attachment 547912 [details]
future quantity

I tested this with 4 sockets:

 - Subscribe to future entitlement with quantity of 4
 - Open subscription assistant

The quantity shows the right number needed for current compliance.

subscription-manager-gnome-0.98.8-1.git.10.9010475.el5_7
subscription-manager-0.98.8-1.git.10.9010475.el5_7
python-rhsm-0.99.1-1.git.1.20cbd9e.el5_7

Marking VERIFIED.

Comment 5 William Poteat 2012-01-23 13:13:47 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No description necessary

Comment 6 errata-xmlrpc 2012-02-21 06:41:55 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.

http://rhn.redhat.com/errata/RHBA-2012-0154.html