Bug 734867 - subscription-manager subscribe --auto fails against stage on a rhel-6-server system
Summary: subscription-manager subscribe --auto fails against stage on a rhel-6-server ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Candlepin
Classification: Community
Component: candlepin
Version: 0.5
Hardware: Unspecified
OS: Solaris
unspecified
urgent
Target Milestone: ---
: ---
Assignee: Bryan Kearney
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel62
TreeView+ depends on / blocked
 
Reported: 2011-08-31 17:05 UTC by John Sefler
Modified: 2015-05-14 15:22 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-05-30 13:14:16 UTC
Embargoed:


Attachments (Terms of Use)

Description John Sefler 2011-08-31 17:05:14 UTC
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 15:46:03 UTC
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 21:13:01 UTC
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 13:16:56 UTC
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.