Bug 1147914

Summary: End date is inappropriate when you attach a subscription with unlimited guest_limit
Product: Red Hat Enterprise Linux 7 Reporter: Shwetha Kallesh <skallesh>
Component: subscription-managerAssignee: William Poteat <wpoteat>
Status: CLOSED CURRENTRELEASE QA Contact: John Sefler <jsefler>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.1CC: bkearney, wpoteat
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: 2015-08-04 15:34:14 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: 1125249    

Description Shwetha Kallesh 2014-09-30 09:53:20 UTC
Description of problem:
Observed that when you attach a subscription with unlimited guest limit on a system that has future subscription with guest limit 4 and a current subscription with guest limit 4 

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

[root@localhost ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.9.31-1
subscription management rules: 5.11
subscription-manager: 1.13.2-1.git.14.1a66208.el7
python-rhsm: 1.13.2-1.git.1.fbbcd59.el7

How reproducible:


Steps to Reproduce:


[root@localhost ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Awesome OS Stackable guest limit 4
Provides:          Awesome OS Server Bits
SKU:               awesomeos-guestlimit-4-stackable
Contract:          1
Account:           12331131231
Serial:            3567323619363861007
Pool ID:           ff80808148c52dc40148c52e54200d54
Active:            True
Quantity Used:     1
Service Level:     
Service Type:      
Status Details:    
Subscription Type: Stackable
Starts:            09/30/2014
Ends:              09/30/2015
System Type:       Physical

Subscription Name: Awesome OS Stackable guest limit 4
Provides:          Awesome OS Server Bits
SKU:               awesomeos-guestlimit-4-stackable
Contract:          1
Account:           12331131231
Serial:            6714791573360620574
Pool ID:           ff80808148c52dc40148c52e52d00ce4
Active:            False
Quantity Used:     1
Service Level:     
Service Type:      
Status Details:    
Subscription Type: Stackable
Starts:            09/20/2015
Ends:              09/19/2016
System Type:       Physical

Subscription Name: Awesome OS Super Hypervisor
Provides:          Awesome Hypervisor Bits
SKU:               awesomeos-super-hypervisor
Contract:          1
Account:           12331131231
Serial:            1881477617783719819
Pool ID:           ff80808148c52dc40148c52e53670d1c
Active:            True
Quantity Used:     1
Service Level:     
Service Type:      
Status Details:    
Subscription Type: Stackable
Starts:            09/30/2014
Ends:              09/30/2015
System Type:       Physical

[root@localhost ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Awesome OS Server Bits
Product ID:     37060
Version:        6.1
Arch:           ALL
Status:         Subscribed
Status Details: 
Starts:         09/30/2014
Ends:           09/30/2015  -----> observe that end date should be 09/19/2016

Now remove the subscription with guest limit unlimited 

[root@localhost ~]# subscription-manager remove --serial 1881477617783719819 
Serial numbers successfully removed at the server:
   1881477617783719819
1 local certificate has been deleted.



[root@localhost ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Awesome OS Server Bits
Product ID:     37060
Version:        6.1
Arch:           ALL
Status:         Partially Subscribed
Status Details: Only supports 4 of 5 virtual guests.
Starts:         09/30/2014
Ends:           09/19/2016  -----> notice that after removing the subscription end date changes to 09/19/2016



Actual results:


Expected results:


Additional info:

Comment 3 William Poteat 2015-08-04 15:34:14 UTC
I do not see the behavior in current release.