Bug 746218 - auto-heal isn't working for partial subscription
Summary: auto-heal isn't working for partial subscription
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager
Version: 5.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 5.8
Assignee: Devan Goodwin
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks: 715031
TreeView+ depends on / blocked
 
Reported: 2011-10-14 12:09 UTC by Shwetha Kallesh
Modified: 2013-01-10 10:56 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-29 19:05:10 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Shwetha Kallesh 2011-10-14 12:09:59 UTC
Description of problem:
auto-heal isn't working for partial subscription

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

subscription-manager-0.96.15-1.el6.x86_64.rpm
subscription-manager-firstboot-0.96.15-1.el6.x86_64.rpm
subscription-manager-gnome-0.96.15-1.el6.x86_64.rpm


How reproducible:


Steps to Reproduce:
1.Set healing frequency for 5 min at rhsm.conf and 
2.restart rhsmcertd service 
3.Register client to candlepin.
4.partially subscribe to any subscription
  
Actual results:

susbcription quantity remains same after 5 minutes


Expected results:

Subscription quantity should increase

Additional info:

Comment 3 John Sefler 2011-10-24 21:02:12 UTC
To provide a little more detail for a re-create, I'm cut and pasting a scenario from bug 710172...
[root@jsefler-onprem-62server ~]# rpm -q subscription-manager
subscription-manager-0.96.16-1.el6.x86_64
[root@jsefler-onprem-62server ~]# rpm -q python-rhsm
python-rhsm-0.96.15-1.el6.noarch
[root@jsefler-onprem-62server ~]# subscription-manager facts --list | grep cpu_socket
cpu.cpu_socket(s): 6
lscpu.cpu_socket(s): 6
[root@jsefler-onprem-62server ~]#


Case 3. 
A consumer who is yellow (Partially Subscribed) and has the healing flag set on the server should get new certs starting today...
FOR THIS CASE I WILL RESET THE DATE BACK AND START OVER...
[root@jsefler-onprem-62server ~]# date 102415002011
Mon Oct 24 15:00:00 EDT 2011
[root@jsefler-onprem-62server ~]# subscription-manager clean
All local data removed
[root@jsefler-onprem-62server ~]# subscription-manager register --username testuser1 --password password --org admin
The system has been registered with id: 3ce3c25c-f548-406e-b7fa-18c0e764b9be 
[root@jsefler-onprem-62server ~]# ls /etc/pki/product/
100000000000002.pem
[root@jsefler-onprem-62server ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+

ProductName:        	Awesome OS for x86_64 Bits
Version:            	3.11                     
Arch:               	x86_64                   
Status:             	Not Subscribed           
Starts:             	                         
Expires:            	                         

[root@jsefler-onprem-62server ~]# subscription-manager list --avail | grep awesomeos-x86_64 -B1 -A5 | grep Yes -A2 -B4
ProductName:       	Awesome OS for x86_64    
ProductId:         	awesomeos-x86_64         
PoolId:            	8a90f8053329760d01332977816b0552
Quantity:          	5                        
Multi-Entitlement: 	Yes                      
Expires:           	10/19/2012               
MachineType:       	physical                 
--
ProductName:       	Awesome OS for x86_64    
ProductId:         	awesomeos-x86_64         
PoolId:            	8a90f8053329760d0133297781470547
Quantity:          	10                       
Multi-Entitlement: 	Yes                      
Expires:           	10/19/2012               
MachineType:       	physical                 
[root@jsefler-onprem-62server ~]#
[root@jsefler-onprem-62server ~]# subscription-manager subscribe --pool 8a90f8053329760d0133297781470547 --quantity 2
Successfully subscribed the system to Pool 8a90f8053329760d0133297781470547
[root@jsefler-onprem-62server ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+

ProductName:        	Awesome OS for x86_64 Bits
Version:            	3.11                     
Arch:               	x86_64                   
Status:             	Partially Subscribed     
Starts:             	10/20/2011               
Expires:            	10/19/2012               

[root@jsefler-onprem-62server ~]# 
RESTART THE RHSMCERTD TO FORCE A TRIGGER OF AUTOHEAL
[root@jsefler-onprem-62server ~]# service rhsmcertd restart
Stopping rhsmcertd                                         [  OK  ]
Starting rhsmcertd 240 1440                                [  OK  ]
[root@jsefler-onprem-62server ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+

ProductName:        	Awesome OS for x86_64 Bits
Version:            	3.11                     
Arch:               	x86_64                   
Status:             	Partially Subscribed     
Starts:             	10/20/2011               
Expires:            	10/19/2012               

^^^ NOTICE NO CHANGE IN THE INSTALLED STATUS.  THAT'S WRONG.
[root@jsefler-onprem-62server ~]# subscription-manager list --consumed
+-------------------------------------------+
    Consumed Product Subscriptions
+-------------------------------------------+


ProductName:        	Awesome OS for x86_64 Bits
ContractNumber:     	31                       
AccountNumber:      	12331131231              
SerialNumber:       	3132781798196388922      
Active:             	True                     
QuantityUsed:       	2                        
Begins:             	10/20/2011               
Expires:            	10/19/2012               

[root@jsefler-onprem-62server ~]# subscription-manager facts --list | grep valid
system.entitlements_valid: False

^^^ BANG! THAT'S WRONG.  WE SHOULD HAVE BEEN AUTOSUBSCRIBED TO COMPLETE THE CONSUMPTION TO MEET THE SOCKET COVERAGE AND GET FULLY "Subscribed"... 

HERE IS THE rhsm.log TO HELP TROUBLESHOOT WHY THE AUTOSUBSCRIBE DID NOT COMPLETE THE PARTIAL SUBSCRIPTION...

2011-10-24 16:36:25,640 [INFO]  @connection.py:350 - Using certificate authentication: key = /etc/pki/consumer/key.pem, cert = /etc/pki/consumer/cert.pem, ca = /etc/rhsm/ca/, insecure = False
2011-10-24 16:36:25,644 [DEBUG]  @connection.py:188 - Loading CA PEM certificates from: /etc/rhsm/ca/
2011-10-24 16:36:25,644 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2011-10-24 16:36:25,645 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/jsefler-onprem-62candlepin.pem'
2011-10-24 16:36:25,645 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2011-10-24 16:36:25,645 [INFO]  @connection.py:350 - Using certificate authentication: key = /etc/pki/consumer/key.pem, cert = /etc/pki/consumer/cert.pem, ca = /etc/rhsm/ca/, insecure = False
2011-10-24 16:36:25,646 [DEBUG]  @connection.py:209 - Making request: GET /candlepin/
2011-10-24 16:36:25,647 [DEBUG]  @connection.py:188 - Loading CA PEM certificates from: /etc/rhsm/ca/
2011-10-24 16:36:25,647 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2011-10-24 16:36:25,648 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/jsefler-onprem-62candlepin.pem'
2011-10-24 16:36:25,648 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2011-10-24 16:36:25,649 [DEBUG]  @connection.py:209 - Making request: GET /candlepin/
2011-10-24 16:36:25,731 [DEBUG]  @connection.py:218 - Response status: 200
2011-10-24 16:36:25,733 [DEBUG]  @connection.py:379 - Server supports the following resources:
2011-10-24 16:36:25,734 [DEBUG]  @connection.py:380 - {'serials': '/serials', 'status': '/status', 'owners': '/owners', 'jobs': '/jobs', 'users': '/users', 'consumers': '/consumers', 'subscriptions': '/subscriptions', 'admin': '/admin', 'consumertypes': '/consumertypes', 'statistics/generate': '/statistics/generate', 'migrations': '/migrations', 'content': '/content', 'pools': '/pools', 'products': '/products', 'roles': '/roles', 'activation_keys': '/activation_keys', 'atom': '/atom', 'entitlements': '/entitlements', 'events': '/events', 'crl': '/crl', 'rules': '/rules'}
2011-10-24 16:36:25,735 [INFO]  @connection.py:362 - Connection Established: host: jsefler-onprem-62candlepin.usersys.redhat.com, port: 8443, handler: /candlepin
2011-10-24 16:36:25,742 [DEBUG]  @connection.py:218 - Response status: 200
2011-10-24 16:36:25,743 [DEBUG]  @connection.py:379 - Server supports the following resources:
2011-10-24 16:36:25,743 [DEBUG]  @connection.py:380 - {'serials': '/serials', 'status': '/status', 'owners': '/owners', 'jobs': '/jobs', 'users': '/users', 'consumers': '/consumers', 'subscriptions': '/subscriptions', 'admin': '/admin', 'consumertypes': '/consumertypes', 'statistics/generate': '/statistics/generate', 'migrations': '/migrations', 'content': '/content', 'pools': '/pools', 'products': '/products', 'roles': '/roles', 'activation_keys': '/activation_keys', 'atom': '/atom', 'entitlements': '/entitlements', 'events': '/events', 'crl': '/crl', 'rules': '/rules'}
2011-10-24 16:36:25,744 [INFO]  @connection.py:362 - Connection Established: host: jsefler-onprem-62candlepin.usersys.redhat.com, port: 8443, handler: /candlepin
2011-10-24 16:36:25,926 [DEBUG]  @cert_sorter.py:89 - Sorting product and entitlement cert status for: 2011-10-24 20:36:25.925927+00:00
2011-10-24 16:36:25,928 [DEBUG]  @cert_sorter.py:176 - Installed product IDs: ['100000000000002']
2011-10-24 16:36:25,945 [DEBUG]  @cert_sorter.py:93 - valid entitled products: []
2011-10-24 16:36:25,945 [DEBUG]  @cert_sorter.py:94 - expired entitled products: []
2011-10-24 16:36:25,946 [DEBUG]  @cert_sorter.py:95 - partially entitled products: ['100000000000002']
2011-10-24 16:36:25,946 [DEBUG]  @cert_sorter.py:96 - unentitled products: []
2011-10-24 16:36:25,946 [DEBUG]  @cert_sorter.py:97 - future products: []
2011-10-24 16:36:25,947 [DEBUG]  @cert_sorter.py:89 - Sorting product and entitlement cert status for: 2011-10-24 20:36:25.947583+00:00
2011-10-24 16:36:25,950 [DEBUG]  @cert_sorter.py:176 - Installed product IDs: ['100000000000002']
2011-10-24 16:36:25,967 [DEBUG]  @cert_sorter.py:93 - valid entitled products: []
2011-10-24 16:36:25,967 [DEBUG]  @cert_sorter.py:94 - expired entitled products: []
2011-10-24 16:36:25,967 [DEBUG]  @cert_sorter.py:95 - partially entitled products: ['100000000000002']
2011-10-24 16:36:25,968 [DEBUG]  @cert_sorter.py:96 - unentitled products: []
2011-10-24 16:36:25,968 [DEBUG]  @cert_sorter.py:97 - future products: []
2011-10-24 16:36:25,974 [INFO]  @repolib.py:107 - repos updated: 20
2011-10-24 16:36:26,110 [DEBUG]  @cert_sorter.py:89 - Sorting product and entitlement cert status for: 2011-10-24 20:36:26.109765+00:00
2011-10-24 16:36:26,116 [DEBUG]  @cert_sorter.py:176 - Installed product IDs: ['100000000000002']
2011-10-24 16:36:26,136 [DEBUG]  @cert_sorter.py:93 - valid entitled products: []
2011-10-24 16:36:26,136 [DEBUG]  @cert_sorter.py:94 - expired entitled products: []
2011-10-24 16:36:26,137 [DEBUG]  @cert_sorter.py:95 - partially entitled products: ['100000000000002']
2011-10-24 16:36:26,137 [DEBUG]  @cert_sorter.py:96 - unentitled products: []
2011-10-24 16:36:26,138 [DEBUG]  @cert_sorter.py:97 - future products: []
2011-10-24 16:36:26,139 [INFO]  @factlib.py:52 - Facts have not changed, skipping upload.
2011-10-24 16:36:26,141 [INFO]  @cache.py:209 - Server does not support packages, skipping profile upload.
2011-10-24 16:36:26,146 [INFO]  @cache.py:154 - Checking current system info against cache: /var/lib/rhsm/cache/installed_products.json
2011-10-24 16:36:26,148 [INFO]  @cache.py:169 - No changes.
2011-10-24 16:36:26,156 [DEBUG]  @connection.py:188 - Loading CA PEM certificates from: /etc/rhsm/ca/
2011-10-24 16:36:26,157 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2011-10-24 16:36:26,158 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/jsefler-onprem-62candlepin.pem'
2011-10-24 16:36:26,159 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2011-10-24 16:36:26,161 [DEBUG]  @connection.py:209 - Making request: GET /candlepin/consumers/3ce3c25c-f548-406e-b7fa-18c0e764b9be/certificates/serials
2011-10-24 16:36:26,281 [DEBUG]  @connection.py:218 - Response status: 200
2011-10-24 16:36:26,291 [INFO]  @certlib.py:201 - certs updated:
Total updates: 0
Found (local) serial# [3132781798196388922L]
Expected (UEP) serial# [3132781798196388922]
Added (new)
  <NONE>
Deleted (rogue):
  <NONE>
Expired (not deleted):
  <NONE>
Expired (deleted):
  <NONE>
2011-10-24 16:36:26,476 [DEBUG]  @connection.py:188 - Loading CA PEM certificates from: /etc/rhsm/ca/
2011-10-24 16:36:26,477 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2011-10-24 16:36:26,479 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/jsefler-onprem-62candlepin.pem'
2011-10-24 16:36:26,479 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2011-10-24 16:36:26,480 [DEBUG]  @connection.py:209 - Making request: GET /candlepin/consumers/3ce3c25c-f548-406e-b7fa-18c0e764b9be
2011-10-24 16:36:26,639 [DEBUG]  @connection.py:218 - Response status: 200
2011-10-24 16:36:26,652 [INFO]  @certlib.py:111 - Checking if system requires healing.
2011-10-24 16:36:26,652 [DEBUG]  @cert_sorter.py:89 - Sorting product and entitlement cert status for: 2011-10-24 20:36:26.652473+00:00
2011-10-24 16:36:26,655 [DEBUG]  @cert_sorter.py:176 - Installed product IDs: ['100000000000002']
2011-10-24 16:36:26,668 [DEBUG]  @cert_sorter.py:93 - valid entitled products: ['100000000000002']
2011-10-24 16:36:26,668 [DEBUG]  @cert_sorter.py:94 - expired entitled products: []
2011-10-24 16:36:26,668 [DEBUG]  @cert_sorter.py:95 - partially entitled products: []
2011-10-24 16:36:26,668 [DEBUG]  @cert_sorter.py:96 - unentitled products: []
2011-10-24 16:36:26,668 [DEBUG]  @cert_sorter.py:97 - future products: []
2011-10-24 16:36:26,669 [INFO]  @certlib.py:130 - Entitlements are valid for today: 2011-10-24 20:36:26.652473+00:00
2011-10-24 16:36:26,669 [DEBUG]  @cert_sorter.py:89 - Sorting product and entitlement cert status for: 2011-10-25 20:36:26.652473+00:00
2011-10-24 16:36:26,672 [DEBUG]  @cert_sorter.py:176 - Installed product IDs: ['100000000000002']
2011-10-24 16:36:26,687 [DEBUG]  @cert_sorter.py:93 - valid entitled products: ['100000000000002']
2011-10-24 16:36:26,687 [DEBUG]  @cert_sorter.py:94 - expired entitled products: []
2011-10-24 16:36:26,687 [DEBUG]  @cert_sorter.py:95 - partially entitled products: []
2011-10-24 16:36:26,687 [DEBUG]  @cert_sorter.py:96 - unentitled products: []
2011-10-24 16:36:26,687 [DEBUG]  @cert_sorter.py:97 - future products: []
2011-10-24 16:36:26,688 [INFO]  @certlib.py:140 - Entitlements are valid for tomorrow: 2011-10-25 20:36:26.652473+00:00
2011-10-24 16:36:26,688 [INFO]  @certlib.py:147 - Auto-heal check complete.
2011-10-24 16:36:26,689 [DEBUG]  @cert_sorter.py:89 - Sorting product and entitlement cert status for: 2011-10-24 20:36:26.688955+00:00
2011-10-24 16:36:26,690 [DEBUG]  @cert_sorter.py:176 - Installed product IDs: ['100000000000002']
2011-10-24 16:36:26,702 [DEBUG]  @cert_sorter.py:93 - valid entitled products: ['100000000000002']
2011-10-24 16:36:26,702 [DEBUG]  @cert_sorter.py:94 - expired entitled products: []
2011-10-24 16:36:26,702 [DEBUG]  @cert_sorter.py:95 - partially entitled products: []
2011-10-24 16:36:26,702 [DEBUG]  @cert_sorter.py:96 - unentitled products: []
2011-10-24 16:36:26,702 [DEBUG]  @cert_sorter.py:97 - future products: []
2011-10-24 16:36:26,719 [INFO]  @certlib.py:151 - Current installed product status:
2011-10-24 16:36:26,719 [INFO]  @certlib.py:154 - 
ProductName:         	Awesome OS for x86_64 Bits
Status:               	3.11                     

2011-10-24 16:36:26,724 [DEBUG]  @connection.py:188 - Loading CA PEM certificates from: /etc/rhsm/ca/
2011-10-24 16:36:26,725 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2011-10-24 16:36:26,725 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/jsefler-onprem-62candlepin.pem'
2011-10-24 16:36:26,726 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2011-10-24 16:36:26,727 [DEBUG]  @connection.py:209 - Making request: GET /candlepin/consumers/3ce3c25c-f548-406e-b7fa-18c0e764b9be/certificates/serials
2011-10-24 16:36:26,868 [DEBUG]  @connection.py:218 - Response status: 200
2011-10-24 16:36:26,881 [INFO]  @certlib.py:201 - certs updated:
Total updates: 0
Found (local) serial# [3132781798196388922L]
Expected (UEP) serial# [3132781798196388922]
Added (new)
  <NONE>
Deleted (rogue):
  <NONE>
Expired (not deleted):
  <NONE>
Expired (deleted):
  <NONE>

NOTE: IF WE MANUALY TRIGGER AUTOSUBSCRIBE, THEN THE PARTIAL SUBSCRIPTION COMPLETES...  THEREFORE AUTOSUBSCRIBE IS POSSIBLE.  IT'S AUTOHEAL THAT IS DROPPING THE BALL...

[root@jsefler-onprem-62server ~]# subscription-manager subscribe --auto
Installed Product Current Status:

ProductName:         	Awesome OS for x86_64 Bits
Status:               	Subscribed               

[root@jsefler-onprem-62server ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+

ProductName:        	Awesome OS for x86_64 Bits
Version:            	3.11                     
Arch:               	x86_64                   
Status:             	Subscribed               
Starts:             	10/20/2011               
Expires:            	10/19/2012               

[root@jsefler-onprem-62server ~]# subscription-manager list --consumed
+-------------------------------------------+
    Consumed Product Subscriptions
+-------------------------------------------+


ProductName:        	Awesome OS for x86_64 Bits
ContractNumber:     	31                       
AccountNumber:      	12331131231              
SerialNumber:       	3132781798196388922      
Active:             	True                     
QuantityUsed:       	2                        
Begins:             	10/20/2011               
Expires:            	10/19/2012               


ProductName:        	Awesome OS for x86_64 Bits
ContractNumber:     	30                       
AccountNumber:      	12331131231              
SerialNumber:       	7316594870637580782      
Active:             	True                     
QuantityUsed:       	4                        
Begins:             	10/20/2011               
Expires:            	10/19/2012               

[root@jsefler-onprem-62server ~]#

Comment 4 Devan Goodwin 2011-11-07 16:29:30 UTC
Recent work appears to have corrected this issue:

(root@redhat ~) $ subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
ProductName:            Awesome OS for x86_64 Bits
Version:                3.11                     
Arch:                   x86_64                   
Status:                 Partially Subscribed     
Starts:                 11/06/2011               
Expires:                11/05/2012               



(root@redhat ~) $ subscription-manager list --consumed
+-------------------------------------------+
    Consumed Product Subscriptions
+-------------------------------------------+

ProductName:            Awesome OS for x86_64 Bits
ContractNumber:         31                       
AccountNumber:          12331131231              
SerialNumber:           7396786282936698899      
Active:                 True                     
QuantityUsed:           1                        
Begins:                 11/06/2011               
Expires:                11/05/2012      


Trigger healing:

     (root@redhat ~) $ service rhsmcertd restart
Restarting rhsmcertd (via systemctl):                      [  OK  ]
(root@redhat ~) $ subscription-manager list --consumed
+-------------------------------------------+
    Consumed Product Subscriptions
+-------------------------------------------+

ProductName:            Awesome OS for x86_64 Bits
ContractNumber:         31                       
AccountNumber:          12331131231              
SerialNumber:           7396786282936698899      
Active:                 True                     
QuantityUsed:           1                        
Begins:                 11/06/2011               
Expires:                11/05/2012               

ProductName:            Awesome OS for x86_64 Bits
ContractNumber:         31                       
AccountNumber:          12331131231              
SerialNumber:           4822095335910389647      
Active:                 True                     
QuantityUsed:           1                        
Begins:                 11/06/2011               
Expires:                11/05/2012               

(root@redhat ~) $ subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
ProductName:            Awesome OS for x86_64 Bits
Version:                3.11                     
Arch:                   x86_64                   
Status:                 Subscribed               
Starts:                 11/06/2011               
Expires:                11/05/2012               

(root@redhat ~) $ subscription-manager facts --list | grep valid         
system.entitlements_valid: valid

Comment 5 John Sefler 2011-11-30 22:39:53 UTC
Veryfying...
[root@jsefler-onprem-5server ~]# rpm -q subscription-manager
subscription-manager-0.98.3-1.git.18.fae0fc6.el5_7
[root@jsefler-onprem-5server ~]# rpm -q python-rhsm
python-rhsm-0.98.3-1.git.2.74cd6bb.el5_7
[root@jsefler-f14-5candlepin candlepin]# git branch
  0.2
  0.3
  0.4
* master
[root@jsefler-f14-5candlepin candlepin]# git show-ref | grep master
8aca816c968da566625fcee5e743f4261db44171 refs/heads/master
8aca816c968da566625fcee5e743f4261db44171 refs/remotes/origin/master
[root@jsefler-f14-5candlepin candlepin]# curl --insecure --user admin:admin --request GET https://jsefler-f14-5candlepin.usersys.redhat.com:8443/candlepin/status
{"version":"0.5.2","result":true,"standalone":true,"release":"1"}


STARTING WITH THE FOLLOWING PRODUCT CERT INSTALLED ON AN 8 SOCKET SYSTEM...
[root@jsefler-onprem-5server ~]# ls /etc/pki/product/
100000000000002.pem
[root@jsefler-onprem-5server ~]# subscription-manager facts --list | grep cpu_socket
cpu.cpu_socket(s): 8
lscpu.cpu_socket(s): 8


SET THE HEAL FREQUENCY TO 2 MINUTES AND RESTART RHSMCERTD...
[root@jsefler-onprem-5server ~]# subscription-manager config --rhsmcertd.healfrequency=2
[root@jsefler-onprem-5server ~]# service rhsmcertd restart
Stopping rhsmcertd                                         [  OK  ]
Starting rhsmcertd 240 2                                   [  OK  ]
[root@jsefler-onprem-5server ~]# 

REGISTER AND SUBSCRIBE WITH ONLY A PARTIAL QUANTITY...
[root@jsefler-onprem-5server ~]# subscription-manager register --username testuser1 --password password --org admin
The system has been registered with id: e0db1d94-7d35-4eef-97de-0735a0e1e73c 
[root@jsefler-onprem-5server ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
ProductName:          	Awesome OS for x86_64 Bits
Version:              	3.11                     
Arch:                 	x86_64                   
Status:               	Not Subscribed           
Starts:               	None                     
Expires:              	None 

[root@jsefler-onprem-5server ~]# subscription-manager list --avail | grep awesomeos-x86_64 -B1 -A5 | grep Yes -A2 -B4
ProductName:          	Awesome OS for x86_64    
ProductId:            	awesomeos-x86_64         
PoolId:               	8a90f85733f652960133f653784002ad
Quantity:             	10                       
Multi-Entitlement:    	Yes                      
Expires:              	11/28/2012               
MachineType:          	physical                 
--
ProductName:          	Awesome OS for x86_64    
ProductId:            	awesomeos-x86_64         
PoolId:               	8a90f85733f652960133f653785b02b7
Quantity:             	5                        
Multi-Entitlement:    	Yes                      
Expires:              	11/28/2012               
MachineType:          	physical                 

[root@jsefler-onprem-5server ~]# subscription-manager subscribe --pool 8a90f85733f652960133f653785b02b7 --quantity 2
Successfully consumed a subscription from the pool with id 8a90f85733f652960133f653785b02b7
[root@jsefler-onprem-5server ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
ProductName:          	Awesome OS for x86_64 Bits
Version:              	3.11                     
Arch:                 	x86_64                   
Status:               	Partially Subscribed     
Starts:               	11/29/2011               
Expires:              	11/28/2012               

[root@jsefler-onprem-5server ~]# subscription-manager list --consumed
+-------------------------------------------+
    Consumed Product Subscriptions
+-------------------------------------------+

ProductName:          	Awesome OS for x86_64 Bits
ContractNumber:       	22                       
AccountNumber:        	12331131231              
SerialNumber:         	6807408832040266077      
Active:               	True                     
QuantityUsed:         	2                        
Begins:               	11/29/2011               
Expires:              	11/28/2012               

WAITING 2 MINUTES FOR AUTOHEAL TO AUTOMATICALLY TRIGGER....  

[root@jsefler-onprem-5server ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
ProductName:          	Awesome OS for x86_64 Bits
Version:              	3.11                     
Arch:                 	x86_64                   
Status:               	Subscribed               
Starts:               	11/29/2011               
Expires:              	11/28/2012               

[root@jsefler-onprem-5server ~]# subscription-manager list --consumed
+-------------------------------------------+
    Consumed Product Subscriptions
+-------------------------------------------+

ProductName:          	Awesome OS for x86_64 Bits
ContractNumber:       	22                       
AccountNumber:        	12331131231              
SerialNumber:         	6807408832040266077      
Active:               	True                     
QuantityUsed:         	2                        
Begins:               	11/29/2011               
Expires:              	11/28/2012               

ProductName:          	Awesome OS for x86_64 Bits
ContractNumber:       	23                       
AccountNumber:        	12331131231              
SerialNumber:         	5296156354444568133      
Active:               	True                     
QuantityUsed:         	6                        
Begins:               	11/29/2011               
Expires:              	11/28/2012               

[root@jsefler-onprem-5server ~]# 

SUCCESS!  THE PARTIALLY SUBSCRIBED PRODUCT WAS HEALED WITH AN ADDITIONAL QUANTITY FROM A DIFFERENT POOL NEEDED TO COVER THE 8 SOCKET SYSTEM

Moving to VERIFIED


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