Bug 845126 - system.entitlements_valid goes from valid to partial after oversubscribing
system.entitlements_valid goes from valid to partial after oversubscribing
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager (Show other bugs)
6.3
Unspecified Unspecified
unspecified Severity medium
: rc
: ---
Assigned To: Devan Goodwin
Entitlement Bugs
:
Depends On:
Blocks: rhsm-rhel65 rhsm-rhel70
  Show dependency treegraph
 
Reported: 2012-08-01 17:25 EDT by John Sefler
Modified: 2013-07-18 15:33 EDT (History)
3 users (show)

See Also:
Fixed In Version: subscription-manager-1.1.11-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-18 15:33:37 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-01 17:25:45 EDT
Description of problem:
The test scenario is that my system is fully compliant and then I subscribe (partially) to another subscription from a multi-entitlement pool that provides the same product that is already installed and fully subscribed.  What happpens is that the gui says my installed product is green (this is correct), but the "system.entitlements_valid" fact changes to "partial" (which is wrong).

Version-Release number of selected component (if applicable):
[root@rhsm-compat-rhel63 ~]# rpm -q subscription-manager
subscription-manager-0.99.19.4-1.el6_3.x86_64


How reproducible:


Steps to Reproduce:
[root@rhsm-compat-rhel63 ~]# subscription-manager config --server.hostname=subscription.rhn.stage.redhat.com --server.port=443 --server.prefix=/subscription
[root@rhsm-compat-rhel63 ~]# subscription-manager register --username stacking-stage
Password: 
The system has been registered with id: 5e919e84-ec84-4c42-b60b-c175e06aa192 
[root@rhsm-compat-rhel63 ~]# subscription-manager list --avail
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+

Product Name:         	Red Hat Enterprise Linux Server, Self-support (1-2 sockets)
                        (Up to 1 guest)
Product Id:           	RH0197181                
Pool Id:              	8a99f9863870e1aa0138954553261b89
Quantity:             	95                       
Service Level:        	Self-support             
Service Type:        	L1-L3                    
Multi-Entitlement:    	Yes                      
Expires:              	07/16/2013               
Machine Type:         	physical                 

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

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

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

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

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

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

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

[root@rhsm-compat-rhel63 ~]# subscription-manager subscribe --pool 8a99f9863870e1aa01389545558e1bfe --quantity 4
Successfully consumed a subscription from the pool with id 8a99f9863870e1aa01389545558e1bfe.
[root@rhsm-compat-rhel63 ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:         	Red Hat Enterprise Linux Server
Product ID:           	69                       
Version:              	6.3                      
Arch:                 	x86_64                   
Status:               	Subscribed               
Starts:               	07/17/2012               
Expires:              	07/16/2015               

[root@rhsm-compat-rhel63 ~]# subscription-manager facts --list | grep system.entitlements
system.entitlements_valid: valid
[root@rhsm-compat-rhel63 ~]# subscription-manager subscribe --pool 8a99f9863870e1aa0138954553351b98
Successfully consumed a subscription from the pool with id 8a99f9863870e1aa0138954553351b98.
[root@rhsm-compat-rhel63 ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:         	Red Hat Enterprise Linux Server
Product ID:           	69                       
Version:              	6.3                      
Arch:                 	x86_64                   
Status:               	Subscribed               
Starts:               	07/17/2012               
Expires:              	07/16/2015               

[root@rhsm-compat-rhel63 ~]# subscription-manager facts --list | grep system.entitlements
system.entitlements_valid: partial
[root@rhsm-compat-rhel63 ~]# 
                           ^^^^^^^ WRONG.  THAT SHOULD HAVE STAYED "valid"
  
Actual results:
system.entitlements_valid: partial

Expected results:
system.entitlements_valid: valid

Additional info:
Note that my system was an 8 socket system.  The first subscribe fully subscribed the system to a compliant/valid status.  The second subscribe was made with an implicit quantity of 1 to a pool with a different stacking_id.  If I was only subscribed to this second pool, then the partial system.entitlements_valid fact value would be correct, but I am already consuming enough entitlements from the first pool to make my only installed product fully compliant.  Therefore the system.entitlements_valid fact should remain "valid".
Comment 1 Devan Goodwin 2012-12-05 10:40:42 EST
This looks to be fixed since 0.99.19.4.

subscription-manager-1.1.11-1.el6.x86_64
python-rhsm-1.1.6-1.el6.x86_64

Using same account in stage.

Subscribing first to: 

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

[root@rhel6-dev ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:           Red Hat Enterprise Linux Server
Product ID:             69
Version:                6.3
Arch:                   x86_64
Status:                 Subscribed
Starts:                 10/30/2012
Ends:                   10/29/2013

Now we go for another self-support which would be same stacking ID:

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

[root@rhel6-dev ~]# subscription-manager facts --list | grep valid
system.entitlements_valid: valid
[root@rhel6-dev ~]# 


Can't seem to reproduce, and it's been quite some time since filed, suspect this has been dealt with somewhere by another fix.

Moving to modified.
Comment 3 John Sefler 2012-12-12 19:08:02 EST
I can still reproduce this bug with version...
[root@rhsm-accept-rhel6 ~]# rpm -q subscription-manager
subscription-manager-1.1.14-1.el6.x86_64

The key to reproduce is that the second subscribe should be made to a pool providing the same products but has a DIFFERENT stacking_id.

In this situation we really are fully compliant with respect to the first subscription pool and partially compliant with respect to the second subscription pool.  But because they both provide for the same product that I have installed, my installed product is now over-subscribed, system is green, and the system.entitlements_valid fact says "partial".  I vote that "partial" is wrong and should report "valid".

Moving back to ASSIGNED/FailedQA
Comment 5 Devan Goodwin 2013-03-26 10:48:09 EDT
Any partially completed stack is treated as yellow, even if it does not provide anything installed. In this case we oversubscribe by using something for another stack, but if that stack is not complete then the overall system status should be yellow, which I think is what we are seeing here.
Comment 6 Carter Kozak 2013-07-18 15:33:37 EDT
The calculation of compliance is run on the server, and the system entitlement.valid fact is obsolete.
Old bug, fixed by the new design.

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