Bug 959967 - start date of a subscription is not a valid one when you attach a future subscription and then and heal after 1 min
Summary: start date of a subscription is not a valid one when you attach a future subs...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager
Version: 5.10
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jesus M. Rodriguez
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel510
TreeView+ depends on / blocked
 
Reported: 2013-05-06 10:20 UTC by Shwetha Kallesh
Modified: 2013-09-30 23:07 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
No description necessary
Clone Of:
Environment:
Last Closed: 2013-09-30 23:07:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1332 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2013-09-30 22:49:24 UTC

Description Shwetha Kallesh 2013-05-06 10:20:24 UTC
Description of problem:
start date of a subscription is not a valid one when you attach a future subscription and then and heal after 1 min

Version-Release number of selected component (if applicable):
[root@localhost ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.8.5-1
subscription-manager: 1.8.6-1.git.28.2170845.el5
python-rhsm: 1.8.9-1.git.7.214419e.el5


How reproducible:


Steps to Reproduce:
Steps to Reproduce:
[root@localhost ~]# subscription-manager list --avail --all --ondate 2014-06-06 --servicelevel premium
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name: Multi-Attribute (multi-entitlement only) (8 cores, 4GB)
SKU:               non-stacked-8core4ram-multiattr
Pool ID:           8ac6a3a23e7a3785013e7a3897ef04b5
Quantity:          15
Service Level:     Premium
Service Type:      Level 3
Multi-Entitlement: Yes
Ends:              04/26/2015
System Type:       Physical

Subscription Name: Multi-Attribute Stackable (2 GB, 2 Cores)
SKU:               2cores-2ram-multiattr
Pool ID:           8ac6a3a23e7a3785013e7a389a890548
Quantity:          15
Service Level:     Premium
Service Type:      Level 3
Multi-Entitlement: Yes
Ends:              04/26/2015
System Type:       Physical

Subscription Name: Multi-Attribute Stackable (2 GB)
SKU:               ram2-multiattr
Pool ID:           8ac6a3a23e7a3785013e7a389ae4056f
Quantity:          15
Service Level:     Premium
Service Type:      Level 3
Multi-Entitlement: Yes
Ends:              04/26/2015
System Type:       Physical

Subscription Name: Multi-Attribute Stackable (2 sockets)
SKU:               sock2-multiattr
Pool ID:           8ac6a3a23e7a3785013e7a389cc605b7
Quantity:          15
Service Level:     Premium
Service Type:      Level 3
Multi-Entitlement: Yes
Ends:              04/26/2015
System Type:       Physical

Subscription Name: Multi-Attribute Stackable (4 cores)
SKU:               cores4-multiattr
Pool ID:           8ac6a3a23e7a3785013e7a389b9d0593
Quantity:          15
Service Level:     Premium
Service Type:      Level 3
Multi-Entitlement: Yes
Ends:              04/26/2015
System Type:       Physical

[root@localhost ~]# subscription-manager attach --pool 8ac6a3a23e7a3785013e7a389b9d0593
Successfully attached a subscription for: Multi-Attribute Stackable (4 cores)

[root@localhost ~]# subscription-manager attach --pool 8ac6a3a23e7a3785013e7a389b9d0593
Successfully attached a subscription for: Multi-Attribute Stackable (4 cores)
[root@localhost ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+

Product Name:   Multi-Attribute Limited Product
Product ID:     900
Version:        1.0
Arch:           x86_64
Status:         Future Subscription
Status Details: Not covered by a valid subscription.
Starts:         
Ends:    

Product Name:   Shared File System Bits
Product ID:     88888
Version:        1.0
Arch:           ALL
Not Subscribed
Status Details: Not covered by a valid subscription.
Starts:      
Ends:                

Product Name:   RAM Limiting Product
Product ID:     801
Version:        1.0
Arch:           x86_64
Status:         Not Subscribed
Status Details: Not covered by a valid subscription.
Starts:  
Ends:           

[root@localhost ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Multi-Attribute Stackable (4 cores)
Provides:          Multi-Attribute Limited Product
SKU:               cores4-multiattr
Contract:          187
Account:           12331131231
Serial Number:     6759142935606442374
Pool ID:           8ac6a3a23e7a3785013e7a389b9d0593
Active:            False
Quantity Used:     1
Service Level:     Premium
Service Type:      Level 3
Status Details:    
Starts:            04/26/2014
Ends:              04/26/2015

Subscription Name: Multi-Attribute Stackable (4 cores)
Provides:          Multi-Attribute Limited Product
SKU:               cores4-multiattr
Contract:          187
Account:           12331131231
Serial Number:     7402001037907640376
Pool ID:           8ac6a3a23e7a3785013e7a389b9d0593
Active:            False
Quantity Used:     1
Service Level:     Premium
Service Type:      Level 3
Status Details:    
Starts:            04/26/2014
Ends:              04/26/2015

[root@localhost ~]# cat /etc/rhsm/rhsm.conf | grep auto-attach -A1
# Interval to run auto-attach (in minutes):
autoAttachInterval = 1

After 1 min,

[root@localhost ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Multi-Attribute Limited Product
Product ID:     900
Version:        1.0
Arch:           x86_64
Status:         Subscribed
Status Details: 
Starts:         04/26/2014
Ends:           04/26/2015

^^^Start date should be 05/06/2013 as shown below in consumed list
       
Product Name:   Shared File System Bits
Product ID:     88888
Version:        1.0
Arch:           ALL
Status:         Subscribed
Status Details: 
Starts:         05/06/2013
Ends:           05/06/2014         

Product Name:   RAM Limiting Product
Product ID:     801
Version:        1.0
Arch:           x86_64
Status:         Not Subscribed
Status Details: Not covered by a valid subscription.
Starts:         
          

[root@localhost ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Multi-Attribute (non-stackable) (6 cores, 8GB)
Provides:          Multi-Attribute Limited Product
SKU:               non-stacked-6core8ram-multiattr
Contract:          210
Account:           12331131231
Serial Number:     8353609602812707397
Pool ID:           8ac6a3a23e7a3785013e7a3899bd0513
Active:            True
Quantity Used:     1
Service Level:     Super
Service Type:      Level 3
Status Details:    
Starts:            05/06/2013
Ends:              05/06/2014

------ this is the subscription attached during healing ----------

Subscription Name: Multi-Attribute Stackable (4 cores)
Provides:          Multi-Attribute Limited Product
SKU:               cores4-multiattr
Contract:          187
Account:           12331131231
Serial Number:     6759142935606442374
Pool ID:           8ac6a3a23e7a3785013e7a389b9d0593
Active:            False
Quantity Used:     1
Service Level:     Premium
Service Type:      Level 3
Status Details:    
Starts:            04/26/2014
Ends:              04/26/2015

Subscription Name: Multi-Attribute Stackable (4 cores)
Provides:          Multi-Attribute Limited Product
SKU:               cores4-multiattr
Contract:          187
Account:           12331131231
Serial Number:     7402001037907640376
Pool ID:           8ac6a3a23e7a3785013e7a389b9d0593
Active:            False
Quantity Used:     1
Service Level:     Premium
Service Type:      Level 3
Status Details:    
Starts:            04/26/2014
Ends:              04/26/2015

Subscription Name: Shared File System
Provides:          Shared File System Bits
SKU:               sfs
Contract:          139
Account:           12331131231
Serial Number:     6235532242532832087
Pool ID:           8ac6a3a23e7a3785013e7a38a2320689
Active:            True
Quantity Used:     1
Service Level:     Layered
Service Type:      
Status Details:    
Starts:            05/06/2013
Ends:              05/06/2014




  
Actual results:


Expected results:


Additional info:

Comment 1 RHEL Program Management 2013-05-06 10:27:50 UTC
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 2 Jesus M. Rodriguez 2013-05-22 20:43:59 UTC
Pull Request filed
https://github.com/candlepin/candlepin/pull/265

Comment 3 Jesus M. Rodriguez 2013-05-22 20:44:22 UTC
Leaving as ASSIGNED until PR is reviewed.

Comment 5 Shwetha Kallesh 2013-07-23 09:49:08 UTC
Marking verified!!

[root@localhost ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.8.17-1
subscription-manager: 1.8.13-1.el5
python-rhsm: 1.8.13-1.git.0.85d7af5.el5


[root@localhost ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Multi-Attribute Limited Product
Product ID:     900
Version:        1.0
Arch:           x86_64
Status:         Future Subscription
Status Details: Not covered by a valid subscription.
Starts:         
Ends: 

[root@localhost ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Multi-Attribute Stackable (4 cores)
Provides:          Multi-Attribute Limited Product
SKU:               cores4-multiattr
Contract:          211
Account:           12331131231
Serial:            89639266170577109
Pool ID:           8ac6a3a240054e670140054f703c05d1
Active:            False
Quantity Used:     1
Service Level:     Premium
Service Type:      Level 3
Status Details:


[root@localhost ~]#  cat /etc/rhsm/rhsm.conf | grep auto-attach -A1
# Interval to run auto-attach (in minutes):
autoAttachInterval=2
[root@localhost ~]# subscription-manager auto-attach --enable
Auto-attach preference: enabled
[root@localhost ~]# service rhsmcertd restart
Stopping rhsmcertd...                                      [  OK  ]
Starting rhsmcertd...                   

[root@localhost ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+

Product Name:   Multi-Attribute Limited Product
Product ID:     900
Version:        1.0
Arch:           x86_64
Status:         Subscribed
Status Details: 
Starts:         07/22/2013
Ends:           07/12/2015


[root@localhost ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Multi-Attribute Stackable (4 cores)
Provides:          Multi-Attribute Limited Product
SKU:               cores4-multiattr
Contract:          211
Account:           12331131231
Serial:            89639266170577109
Pool ID:           8ac6a3a240054e670140054f703c05d1
Active:            False
Quantity Used:     1
Service Level:     Premium
Service Type:      Level 3
Status Details:


Subscription Name: Multi-Attribute (non-stackable) (24 cores, 6 sockets, 8GB RAM)
Provides:          Multi-Attribute Limited Product
SKU:               non-stacked-multiattr
Contract:          241
Account:           12331131231
Serial:            144828672410818912
Pool ID:           8ac6a3a240054e670140054f6a300400
Active:            True
Quantity Used:     1
Service Level:     Super
Service Type:      Level 3
Status Details:    
Starts:            07/22/2013
Ends:              07/22/2014

Comment 7 errata-xmlrpc 2013-09-30 23:07:53 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-2013-1332.html


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