Bug 957596

Summary: Multi-Attribute Stackable (16 cores, 4 sockets, 8GB RAM) is not listed in the consumed list after being attached
Product: Red Hat Enterprise Linux 7 Reporter: Shwetha Kallesh <skallesh>
Component: subscription-managerAssignee: Michael Stead <mstead>
Status: CLOSED NOTABUG QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: jgalipea, jsefler, mstead, redakkan, skallesh, spandey
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: 2013-05-17 17:53:27 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: 840995    
Attachments:
Description Flags
Creating expired pool none

Description Shwetha Kallesh 2013-04-29 06:43:16 UTC
Description of problem:
Multi-Attribute Stackable (16 cores, 4 sockets, 8GB RAM) is not listed in the consumed list after being attached

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

[root@localhost ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.8.4-1
subscription-manager: 1.8.6-1.git.4.b3f4bbf.el7
python-rhsm: 1.8.9-1.git.1.bbbb773.el7

How reproducible:


Steps to Reproduce:
[root@localhost ~]# subscription-manager attach --pool 8ac6818a3e4f3ff7013e4f41a0de008d
Successfully attached a subscription for: Multi-Attribute Stackable (16 cores, 4 sockets, 8GB RAM)
[root@localhost ~]# subscription-manager list --consumed
No consumed subscription pools to list
[root@localhost ~]# subscription-manager attach --pool 8ac6818a3e421f3a013e42204f6004dd
Successfully attached a subscription for: RAM Limiting Package (2GB stackable)
[root@localhost ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+

Subscription Name: RAM Limiting Package (2GB stackable)
Provides:          RAM Limiting Product
SKU:               ram-2gb-stackable
Contract:          157
Account:           12331131231
Serial Number:     3423880049998786646
Pool ID:           8ac6818a3e421f3a013e42204f6004dd
Active:            True
Quantity Used:     1
Service Level:     
Service Type:      
Starts:            04/25/2013
Ends:              04/25/2014

Actual results:


Expected results:


Additional info:

Comment 2 Shwetha Kallesh 2013-04-29 07:09:31 UTC
The subscription attached was about to expire,hence it was not attached

Expected Result:

message should be displayed if we try to attach an expired subscription or an expiring subscription saying you are trying to attach an expired subscription

Comment 3 Michael Stead 2013-04-30 11:11:03 UTC
Please provide additional information about how this was tested. What were the current dates on the server and client?

Was the subscription expired according to candlepin, or subscription manager, or both?

Comment 4 Shwetha Kallesh 2013-05-14 13:15:55 UTC
Created attachment 747701 [details]
Creating expired pool

[root@localhost ~]# subscription-manager list --avail
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name: Multi-Attribute Stackable (2 GB, 2 Cores)
SKU:               2cores-2ram-multiattr
Pool ID:           8ac6a3a23ea16c61013ea16d87a0040e
Quantity:          5
Service Level:     Premium
Service Type:      Level 3
Multi-Entitlement: Yes
Ends:              05/14/2014
System Type:       Physical

Subscription Name: Multi-Stackable
SKU:               multi-attribute
Pool ID:           8ac6a3a23ea16c61013ea322e8db1acd
Quantity:          20
Service Level:     
Service Type:      
Multi-Entitlement: Yes
Ends:              05/14/2013 <--- this pool is going to expire anytime today
System Type:       Physical
                      


[root@localhost ~]# subscription-manager attach --pool 8ac6a3a23ea16c61013ea322e8db1acd
Successfully attached a subscription for: Multi-Stackable

Moment I attach the pool it gets expired and I don't find it in consumed list

[root@localhost ~]# subscription-manager list --consumed
No consumed subscription pools to list


[root@localhost ~]# date
Tue May 14 18:44:39 IST 2013

[root@candlepin ~]# date
Tue May 14 18:44:36 IST 2013

Comment 5 Michael Stead 2013-05-17 17:45:54 UTC
This appears to behaving as expected.

If an entitlement is not past its end date (expiry), we should be able to consume it regardless of how close you are to the end date.

I'm not sure how benifitial it would be to display a warning that it is about to expire.

I can attach a subscription that will expire in 60 sec, and list --consumed will show it. Once past the expiry, it will not be listed anymore. Attempting to re-attach will display an expiration error.

I suggest that we close this BZ as NOTABUG.

If we strongly feel that we should present a warning, I suggest that we put it on the backlog and tackle it later.

Thoughts?