Bug 734867 - subscription-manager subscribe --auto fails against stage on a rhel-6-server system
subscription-manager subscribe --auto fails against stage on a rhel-6-server ...
Status: CLOSED CURRENTRELEASE
Product: Candlepin
Classification: Community
Component: candlepin (Show other bugs)
0.5
Unspecified Solaris
unspecified Severity urgent
: ---
: ---
Assigned To: Bryan Kearney
John Sefler
:
Depends On:
Blocks: rhsm-rhel62
  Show dependency treegraph
 
Reported: 2011-08-31 13:05 EDT by John Sefler
Modified: 2015-05-14 11:22 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-30 09:14:16 EDT
Type: ---
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 2011-08-31 13:05:14 EDT
Description of problem:
On a rhel62 server system (with product cert 69.pem installed), I should be able to register as stage_test_12 which has access to subscription RH0103708 : Red Hat Enterprise Linux Server, Premium (8 sockets) (Up to 4 guests) and successfully subscribe --auto.  However autosubscribe is not subscribing to anything even though a register with --auto subscribe actually succeeds thereby putting the system into compliance.


Version-Release number of selected component (if applicable):
[root@jsefler-stage-6server product]# rpm -q subscription-manager
subscription-manager-0.96.7-1.el6.x86_64


Steps to Reproduce:
[root@stage62server ~]# ls /etc/pki/product/
69.pem
[root@stage62server ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+

ProductName:        	Red Hat Enterprise Linux 6 Server
Status:             	Not Subscribed           
Expires:            	                         
SerialNumber:       	                         
ContractNumber:     	                         
AccountNumber:      	                         

[root@stage62server ~]# subscription-manager facts --list | grep entitlements_valid
system.entitlements_valid: False


^^^^ ALL OF THIS IS EVIDENCE OF WHAT IS INSTALLED AND NOT COMPLIANT, NOW LET"S REGISTER WITH AUTOSUBSCRIBE...

[root@stage62server ~]# subscription-manager register --user stage_test_12 --pass redhat --auto
The system has been registered with id: ce5c159e-60b6-4f9f-ad6a-daf5a2e938cb 
Installed Product Current Status:

ProductName:         	Red Hat Enterprise Linux Server
Status:               	Subscribed               

[root@stage62server ~]# subscription-manager list --consumed
+-------------------------------------------+
    Consumed Product Subscriptions
+-------------------------------------------+


ProductName:        	Red Hat Enterprise Linux Server
ContractNumber:     	2394344                  
AccountNumber:      	1465502                  
SerialNumber:       	4273679382399099044      
Active:             	True                     
QuantityUsed:       	1                        
Begins:             	06/09/2011               
Expires:            	06/08/2012  
[root@stage62server ~]# subscription-manager facts --list | grep entitlements_valid
system.entitlements_valid: True


^^^^ YES! REGISTER WITH AUTOSUBSCRIBE WORKS AS EXPECTED, NOT LET'S UNSUBSCRIBE AND TRY AUTOSUBSCRIBE AGAIN (WHILE REGISTERED)....



[root@stage62server ~]# subscription-manager unsubscribe --all
[root@stage62server ~]# subscription-manager facts --list | grep entitlements_valid
system.entitlements_valid: False
[root@stage62server ~]# subscription-manager subscribe --auto
[root@stage62server ~]# subscription-manager facts --list | grep entitlements_valid
system.entitlements_valid: False
[root@stage62server ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+

ProductName:        	Red Hat Enterprise Linux 6 Server
Status:             	Not Subscribed           
Expires:            	                         
SerialNumber:       	                         
ContractNumber:     	                         
AccountNumber:      	                         


^^^^ BANG! THAT'S WRONG.  I SHOULD HAVE BEEN SUBSCRIBED AND VALID JUST AS I WAS WHEN I REGISTERED WITH AUTOSUBSCRIBE.  AS SHOWN BELOW, THE SUBSCRIPTIONS ARE INDEED AVAILABLE

[root@stage62server ~]# subscription-manager list --avail
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+


ProductName:       	Red Hat Enterprise Linux Server, Premium (8 sockets) (Up to
                        4 guests)
ProductId:         	RH0103708                
PoolId:            	8a99f981308acf4201308b9ad4a41d37
Quantity:          	90                       
Multi-Entitlement: 	No                       
Expires:           	06/08/2012               
MachineType:       	physical                 


ProductName:       	Red Hat Enterprise Linux Server, Premium (8 sockets) (Up to
                        4 guests)
ProductId:         	RH0103708                
PoolId:            	8a99f981308acf4201308b9ad7101d3a
Quantity:          	400                      
Multi-Entitlement: 	No                       
Expires:           	06/08/2012               
MachineType:       	virtual                  


ProductName:       	Red Hat Enterprise Linux Advanced Platform, Standard L3
                        (unlimited sockets)
ProductId:         	MCT1035                  
PoolId:            	8a99f981308acf4201309911639a0c51
Quantity:          	96                       
Multi-Entitlement: 	No                       
Expires:           	06/15/2012               
MachineType:       	physical                 


ProductName:       	Red Hat Enterprise Linux Advanced Platform, Standard L3
                        (unlimited sockets)
ProductId:         	MCT1035                  
PoolId:            	8a99f981308acf420130991163ac0c56
Quantity:          	unlimited                
Multi-Entitlement: 	No                       
Expires:           	06/15/2012               
MachineType:       	virtual
Comment 1 James Bowes 2011-10-03 11:46:03 EDT
fixed in candlepin master, 65a89acd

At least i suspect it is. If so, we'll move it off subscription-manager
Comment 3 John Sefler 2011-10-13 17:13:01 EDT
Changing component to Entitlement/candlepin where this bug belongs.
To verify against stage, we need a tagged build newer than 0.4.17 deployed in stage.
Comment 4 John Sefler 2011-10-31 09:16:56 EDT
Verifying this bug...

With the deployment of candlepin 0.4.25 to the stage environment, this bug is fixed as demonstrated below....

[root@intel-s3ea2-04 ~]# rpm -q subscription-manager
subscription-manager-0.96.17-1.el6.x86_64


[root@intel-s3ea2-04 ~]# grep hostname /etc/rhsm/rhsm.conf 
# Server hostname:
hostname=subscription.rhn.stage.redhat.com
proxy_hostname=
[root@intel-s3ea2-04 ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+

ProductName:        	Red Hat Enterprise Linux 6 Server
Version:            	6.1                      
Arch:               	x86_64                   
Status:             	Not Subscribed           
Starts:             	                         
Expires:            	                         


[root@intel-s3ea2-04 ~]# subscription-manager register --username stage_test_12 --password redhat --autosubscribe
The system has been registered with id: 11f57578-0840-459e-be37-fe6453305b1e 
Installed Product Current Status:

ProductName:         	Red Hat Enterprise Linux 6 Server
Status:               	Subscribed               

[root@intel-s3ea2-04 ~]# subscription-manager list --consumed
+-------------------------------------------+
    Consumed Product Subscriptions
+-------------------------------------------+


ProductName:        	Red Hat Enterprise Linux Server
ContractNumber:     	2635037                  
AccountNumber:      	1508113                  
SerialNumber:       	9101562701666144569      
Active:             	True                     
QuantityUsed:       	1                        
Begins:             	10/19/2011               
Expires:            	10/18/2012               

[root@intel-s3ea2-04 ~]# subscription-manager facts --list | grep valid
system.entitlements_valid: True




[root@intel-s3ea2-04 ~]# subscription-manager unsubscribe --all
[root@intel-s3ea2-04 ~]# subscription-manager facts --list | grep valid
system.entitlements_valid: False
[root@intel-s3ea2-04 ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+

ProductName:        	Red Hat Enterprise Linux 6 Server
Version:            	6.1                      
Arch:               	x86_64                   
Status:             	Not Subscribed           
Starts:             	                         
Expires:            	                         

[root@intel-s3ea2-04 ~]# subscription-manager subscribe --auto
Installed Product Current Status:

ProductName:         	Red Hat Enterprise Linux 6 Server
Status:               	Subscribed               

[root@intel-s3ea2-04 ~]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+

ProductName:        	Red Hat Enterprise Linux 6 Server
Version:            	6.1                      
Arch:               	x86_64                   
Status:             	Subscribed               
Starts:             	10/19/2011               
Expires:            	10/18/2012               

[root@intel-s3ea2-04 ~]# subscription-manager facts --list | grep valid
system.entitlements_valid: True
[root@intel-s3ea2-04 ~]# 

^^^^ Both autosubscribe during the registration and during a subscribe call are now passing with candlepin 0.4.25 deployed to stage test environment.
Moving to VERIFIED

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