Bug 845383 - when partially subscribed, autosubscribe could choose a more efficient pool to consume from
when partially subscribed, autosubscribe could choose a more efficient pool t...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager (Show other bugs)
7.0
Unspecified Unspecified
unspecified Severity unspecified
: beta
: 7.0
Assigned To: candlepin-bugs
Entitlement Bugs
:
Depends On:
Blocks: rhsm-rhel70
  Show dependency treegraph
 
Reported: 2012-08-02 17:26 EDT by John Sefler
Modified: 2014-06-17 20:21 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-13 05:18:49 EDT
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)

  None (edit)
Description John Sefler 2012-08-02 17:26:18 EDT
Description of problem:
While testing consumption from stackable multi-entitlement subscriptions, we found that after partially subscribing from one pool, a call to subscription-manager subscribe --auto neglects to consider the already consumed from pool.  As such the autosubscribe consumed more entitlements from another pool than it would have needed if it chose the already consumed from multi-entitlement pool.  As a result, the system is consuming more entitlements than it really needs.


Version-Release number of selected component (if applicable):
[root@jsefler-rhel59 ~]# rpm -q subscription-manager
subscription-manager-1.0.11-1.git.11.4d6cb5a.el5


How reproducible:


Steps to Reproduce:
[root@jsefler-rhel59 ~]# echo '{"cpu.cpu_socket(s)":"8"}' > /etc/rhsm/facts/sockets.facts
[root@jsefler-rhel59 ~]# subscription-manager config --server.hostname=subscription.rhn.stage.redhat.com --server.port=443 --server.prefix=/subscription
[root@jsefler-rhel59 ~]# subscription-manager register --username stacking-stage
Password: 
The system has been registered with id: 6a0cfe3a-6a6c-4d60-8b05-b48928ed1999 
[root@jsefler-rhel59 ~]# subscription-manager list --avail
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name:    	Red Hat Enterprise Linux Server, Self-support (1-2 sockets)
                        (Up to 1 guest)
SKU:                  	RH0197181
Pool Id:              	8a99f9863870e1aa0138954553261b89
Quantity:             	82
Service Level:        	Self-support
Service Type:         	L1-L3
Multi-Entitlement:    	Yes
Ends:                 	07/16/2013
Machine Type:         	physical

Subscription Name:    	Red Hat Enterprise Linux Server, Self-support (1-2 sockets)
                        (Up to 1 guest)
SKU:                  	RH0197181
Pool Id:              	8a99f9863870e1aa0138954553351b98
Quantity:             	96
Service Level:        	Self-support
Service Type:         	L1-L3
Multi-Entitlement:    	Yes
Ends:                 	07/16/2013
Machine Type:         	virtual

Subscription Name:    	Red Hat Enterprise Linux Server, Standard (1-2 sockets) (Up
                        to 1 guest)
SKU:                  	RH0101594
Pool Id:              	8a99f9863870e1aa0138954553e91bab
Quantity:             	92
Service Level:        	Standard
Service Type:         	L1-L3
Multi-Entitlement:    	Yes
Ends:                 	07/16/2013
Machine Type:         	physical

Subscription Name:    	Red Hat Enterprise Linux Server, Standard (1-2 sockets) (Up
                        to 1 guest)
SKU:                  	RH0101594
Pool Id:              	8a99f9863870e1aa0138954553f71bba
Quantity:             	97
Service Level:        	Standard
Service Type:         	L1-L3
Multi-Entitlement:    	Yes
Ends:                 	07/16/2013
Machine Type:         	virtual

Subscription Name:    	Red Hat Enterprise Linux Server, Standard (1-2 sockets) (Up
                        to 4 guests)
SKU:                  	RH0149709
Pool Id:              	8a99f9863870e1aa0138954554bc1bcd
Quantity:             	98
Service Level:        	Standard
Service Type:         	L1-L3
Multi-Entitlement:    	Yes
Ends:                 	07/16/2013
Machine Type:         	physical

Subscription Name:    	Red Hat Enterprise Linux Server, Standard (1-2 sockets) (Up
                        to 4 guests)
SKU:                  	RH0149709
Pool Id:              	8a99f9863870e1aa0138954554cb1bdc
Quantity:             	400
Service Level:        	Standard
Service Type:         	L1-L3
Multi-Entitlement:    	Yes
Ends:                 	07/16/2013
Machine Type:         	virtual

Subscription Name:    	Red Hat Enterprise Linux Server, Standard (1-2 sockets) (Up
                        to 4 guests)
SKU:                  	RH0149709F3
Pool Id:              	8a99f9863870e1aa01389545557c1bef
Quantity:             	95
Service Level:        	Standard
Service Type:         	L1-L3
Multi-Entitlement:    	Yes
Ends:                 	07/16/2015
Machine Type:         	physical

Subscription Name:    	Red Hat Enterprise Linux Server, Standard (1-2 sockets) (Up
                        to 4 guests)
SKU:                  	RH0149709F3
Pool Id:              	8a99f9863870e1aa01389545558e1bfe
Quantity:             	384
Service Level:        	Standard
Service Type:         	L1-L3
Multi-Entitlement:    	Yes
Ends:                 	07/16/2015
Machine Type:         	virtual

[root@jsefler-rhel59 ~]# subscription-manager subscribe --pool 8a99f9863870e1aa01389545558e1bfe --quantity 3
Successfully consumed a subscription for: Red Hat Enterprise Linux Server, Standard (1-2 sockets) (Up to 4 guests)
[root@jsefler-rhel59 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+

Subscription Name:    	Red Hat Enterprise Linux Server, Standard (1-2 sockets) (Up to 4 guests)
Provides:             	Red Hat Beta
                      	Red Hat Enterprise Linux Server
SKU:                  	RH0149709F3
Contract:             	3123704
Account:              	1615601
Serial Number:        	8752797823129815925
Active:               	True
Quantity Used:        	3
Service Level:        	Standard
Service Type:         	L1-L3
Starts:               	07/17/2012
Ends:                 	07/16/2015

[root@jsefler-rhel59 ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:         	Red Hat Enterprise Linux Server
Product ID:           	69
Version:              	5.9
Arch:                 	x86_64
Status:               	Partially Subscribed
Starts:               	
Ends:                 	

[root@jsefler-rhel59 ~]# subscription-manager subscribe --auto
Installed Product Current Status:
Product Name:         	Red Hat Enterprise Linux Server
Status:               	Subscribed

[root@jsefler-rhel59 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+

Subscription Name:    	Red Hat Enterprise Linux Server, Self-support (1-2 sockets) (Up to 1 guest)
Provides:             	Red Hat Beta
                      	Red Hat Enterprise Linux Server
SKU:                  	RH0197181
Contract:             	3123701
Account:              	1615601
Serial Number:        	8340536534309281826
Active:               	True
Quantity Used:        	4
Service Level:        	Self-support
Service Type:         	L1-L3
Starts:               	07/17/2012
Ends:                 	07/16/2013

Subscription Name:    	Red Hat Enterprise Linux Server, Standard (1-2 sockets) (Up to 4 guests)
Provides:             	Red Hat Beta
                      	Red Hat Enterprise Linux Server
SKU:                  	RH0149709F3
Contract:             	3123704
Account:              	1615601
Serial Number:        	8752797823129815925
Active:               	True
Quantity Used:        	3
Service Level:        	Standard
Service Type:         	L1-L3
Starts:               	07/17/2012
Ends:                 	07/16/2015

[root@jsefler-rhel59 ~]# 



  
Actual results:
After running autosubscribe, a quantity of 4 (needed to cover the system's 8 cpu_sockets) was consumed from a pool that provides the only installed product "Red Hat Enterprise Linux Server" 

Expected results:
Because the system was already consuming a quantity of 3 (which covered 6 of the system's 8 sockets), it would have been more efficient for autosubscribe to only consume 1 more entitlement from either the original multi-entitlement pool, or the other stackable pool with the same stacking id (not identifiable by any of the CLI output)


Additional info:
Comment 1 RHEL Product and Program Management 2012-08-02 17:28:08 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 3 Sharath Dwaral 2013-10-11 10:46:18 EDT
# subscription-manager version 
server type: Red Hat Subscription Management
subscription management server: Unknown
subscription-manager: 1.9.9-1.el6
python-rhsm: 1.9.6-1.el6

# subscription-manager facts --list | grep cpu_socket
cpu.cpu_socket(s): 8

# subscription-manager config --server.hostname=subscription.rhn.stage.redhat.com --server.port=443 --server.prefix=/subscription
# subscription-manager register --username stacking-stage
Password:

# subscription-manager list --avail
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name: Red Hat Enterprise Linux Server, Standard (1-2 sockets) (Up to 1 guest)
Provides:          Red Hat Beta
                   Red Hat Enterprise Linux Server
SKU:               RH0101594
Pool ID:           8a99f9833a7a39f2013ab2b1bf791d82
Available:         76
Suggested:         10
Service Level:     Standard
Service Type:      L1-L3
Multi-Entitlement: Yes
Ends:              10/29/2013
System Type:       Physical

Subscription Name: Red Hat Enterprise Linux Server, Standard (1-2 sockets) (Up to 1 guest)
Provides:          Red Hat Beta
                   Red Hat Enterprise Linux Server
SKU:               RH0101594
Pool ID:           8a99f9833a7a39f2013ab2b1bf8b1d93
Available:         74
Suggested:         10
Service Level:     Standard
Service Type:      L1-L3
Multi-Entitlement: Yes
Ends:              10/29/2013
System Type:       Virtual

Subscription Name: Red Hat Enterprise Linux Server, Standard (1-2 sockets) (Up to 4 guests)
Provides:          Red Hat Beta
                   Red Hat Enterprise Linux Server
SKU:               RH0149709
Pool ID:           8a99f9833a7a39f2013ab2b1c0961da8
Available:         70
Suggested:         10
Service Level:     Standard
Service Type:      L1-L3
Multi-Entitlement: Yes
Ends:              10/29/2013
System Type:       Physical

Subscription Name: Red Hat Enterprise Linux Server, Standard (1-2 sockets) (Up to 4 guests)
Provides:          Red Hat Beta
                   Red Hat Enterprise Linux Server
SKU:               RH0149709
Pool ID:           8a99f9833a7a39f2013ab2b1c0a61db9
Available:         300
Suggested:         10
Service Level:     Standard
Service Type:      L1-L3
Multi-Entitlement: Yes
Ends:              10/29/2013
System Type:       Virtual

Subscription Name: Red Hat Enterprise Linux Server, Self-support (1-2 sockets) (Up to 1 guest)
Provides:          Red Hat Beta
                   Red Hat Enterprise Linux Server
SKU:               RH0197181
Pool ID:           8a99f9843a7a3a9d013ab25d803e63b9
Available:         68
Suggested:         10
Service Level:     Self-support
Service Type:      L1-L3
Multi-Entitlement: Yes
Ends:              10/29/2013
System Type:       Physical

Subscription Name: Red Hat Enterprise Linux Server, Self-support (1-2 sockets) (Up to 1 guest)
Provides:          Red Hat Beta
                   Red Hat Enterprise Linux Server
SKU:               RH0197181
Pool ID:           8a99f9843a7a3a9d013ab25d809863ca
Available:         75
Suggested:         10
Service Level:     Self-support
Service Type:      L1-L3
Multi-Entitlement: Yes
Ends:              10/29/2013
System Type:       Virtual

Subscription Name: Red Hat Enterprise Linux Server, Self-support (1-2 sockets) (Up to 1 guest)
Provides:          Red Hat Beta
                   Red Hat Enterprise Linux Server
SKU:               RH0197181F3
Pool ID:           8a99f9843a7a3a9d013ab2b2aa4d63e5
Available:         51
Suggested:         10
Service Level:     Self-support
Service Type:      L1-L3
Multi-Entitlement: Yes
Ends:              10/29/2015
System Type:       Physical

Subscription Name: Red Hat Enterprise Linux Server, Self-support (1-2 sockets) (Up to 1 guest)
Provides:          Red Hat Beta
                   Red Hat Enterprise Linux Server
SKU:               RH0197181F3
Pool ID:           8a99f9843a7a3a9d013ab2b2aa7163f6
Available:         55
Suggested:         10
Service Level:     Self-support
Service Type:      L1-L3
Multi-Entitlement: Yes
Ends:              10/29/2015
System Type:       Virtual


# subscription-manager subscribe --pool 8a99f9833a7a39f2013ab2b1c0a61db9
Successfully attached a subscription for: Red Hat Enterprise Linux Server, Standard (1-2 sockets) (Up to 4 guests)

# subscription-manager list --installed | grep -i "partially subscribed" -A4 -B4
Product Name:   Red Hat Enterprise Linux Server
Product ID:     69
Version:        6.5
Arch:           x86_64
Status:         Partially Subscribed
Status Details: Only covers 6 of 20 sockets.
Starts:         10/30/2012
Ends:           10/29/2013


#  subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Red Hat Enterprise Linux Server, Standard (1-2 sockets) (Up to 4 guests)
Provides:          Red Hat Software Collections Beta (for RHEL Server)
                   Red Hat Enterprise Linux Server
                   Red Hat Enterprise Linux 7 Public Beta
                   Red Hat Beta
SKU:               RH0149709
Contract:          None
Account:           5206832
Serial:            8934821752154287717
Pool ID:           8a99f9833a7a39f2013ab2b1c0a61db9
Active:            True
Quantity Used:     3
Service Level:     Standard
Service Type:      L1-L3
Status Details:    Only covers 6 of 8 sockets.
Starts:            10/30/2012
Ends:              10/29/2013
System Type:       Virtual


# subscription-manager subscribe --auto

# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Red Hat Enterprise Linux Server, Standard (1-2 sockets) (Up to 4 guests)
Provides:          Red Hat Software Collections Beta (for RHEL Server)
                   Red Hat Enterprise Linux Server
                   Red Hat Enterprise Linux 7 Public Beta
                   Red Hat Beta
SKU:               RH0149709
Contract:          None
Account:           5206832
Serial:            8934821752154287717
Pool ID:           8a99f9833a7a39f2013ab2b1c0a61db9
Active:            True
Quantity Used:     3
Service Level:     Standard
Service Type:      L1-L3
Status Details:    
Starts:            10/30/2012
Ends:              10/29/2013
System Type:       Virtual

Subscription Name: Red Hat Enterprise Linux Server, Standard (1-2 sockets) (Up to 4 guests)
Provides:          Red Hat Software Collections Beta (for RHEL Server)
                   Red Hat Enterprise Linux Server
                   Red Hat Enterprise Linux 7 Public Beta
                   Red Hat Beta
SKU:               RH0149709
Contract:          None
Account:           5206832
Serial:            891469205155870409
Pool ID:           8a99f9833a7a39f2013ab2b1c0a61db9
Active:            True
Quantity Used:     1
Service Level:     Standard
Service Type:      L1-L3
Status Details:    
Starts:            10/30/2012
Ends:              10/29/2013
System Type:       Virtual


It is auto subscribing from the same pool to cover the remaining sockets in an efficient way.

VERIFIED
Comment 4 Ludek Smid 2014-06-13 05:18:49 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

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