RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 845383 - when partially subscribed, autosubscribe could choose a more efficient pool to consume from
Summary: when partially subscribed, autosubscribe could choose a more efficient pool t...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: 7.0
Assignee: candlepin-bugs
QA Contact: Entitlement Bugs
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel70
TreeView+ depends on / blocked
 
Reported: 2012-08-02 21:26 UTC by John Sefler
Modified: 2014-06-18 00:21 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 09:18:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description John Sefler 2012-08-02 21:26:18 UTC
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 Program Management 2012-08-02 21:28:08 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 3 Sharath Dwaral 2013-10-11 14:46:18 UTC
# 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 09:18:49 UTC
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.