Bug 607998

Summary: Standalone candlepin not able to subscribe product via regtoken
Product: [Community] Candlepin Reporter: spandey
Component: candlepinAssignee: Bryan Kearney <bkearney>
Status: CLOSED NOTABUG QA Contact: wes hayutin <whayutin>
Severity: medium Docs Contact:
Priority: low    
Version: 0.5CC: kbanerje, spandey
Target Milestone: ---Keywords: QA-Closed
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-06-25 12:23:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description spandey 2010-06-25 11:36:44 UTC
Description of problem:


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


How reproducible:
100%

Prerequisite : 
standalone candlepin : 10.16.120.139 (Configured via fog machine)
Client : Rhel 6 with SM version 63 

Steps to repro : 
Login to client with valid credentials 
execute following command on client console with valid subscription number 

[root@sachrhel6 ~]# subscription-manager-cli subscribe –regtoken=3714-cf3d-ef52-72ce

Expected Result : 
Proper MSG should display regards subscription activation 

Actual Result : 
 subscription-manager-cli subscribe --regtoken=3714-cf3d-ef52-72ce --email=spandey
No such token: 3714-cf3d-ef52-72ce

Comment 1 Bryan Kearney 2010-06-25 12:07:36 UTC
That looks like a hosted token. Does it actually exist? please try a value from the token column in cp_subscription_token

Comment 2 wes hayutin 2010-06-25 13:29:49 UTC
candlepin=# select * from cp_user;
 id |         created         |         updated         | password | superadmin | username | owner_id 
----+-------------------------+-------------------------+----------+------------+----------+----------
  1 | 2010-06-25 09:25:39.947 | 2010-06-25 09:25:39.947 | admin    | t          | admin    |        1
(1 row)

candlepin=# select * from cp_subscription_token;
 id |         created         |         updated         |   token    | subscription_id 
----+-------------------------+-------------------------+------------+-----------------
  1 | 2010-06-25 09:26:22.449 | 2010-06-25 09:26:22.449 | 9568455619 |               1
  2 | 2010-06-25 09:26:23.032 | 2010-06-25 09:26:23.032 | 636189132  |               2
  3 | 2010-06-25 09:26:30.774 | 2010-06-25 09:26:30.774 | 1491643041 |               3
  4 | 2010-06-25 09:26:31.481 | 2010-06-25 09:26:31.481 | 791850022  |               4
  5 | 2010-06-25 09:26:32.241 | 2010-06-25 09:26:32.241 | 5518168176 |               5
  6 | 2010-06-25 09:26:32.913 | 2010-06-25 09:26:32.913 | 4752558445 |               6
  7 | 2010-06-25 09:26:33.628 | 2010-06-25 09:26:33.628 | 4656236084 |               7
  8 | 2010-06-25 09:26:42.936 | 2010-06-25 09:26:42.936 | 4770162941 |               8
  9 | 2010-06-25 09:26:43.448 | 2010-06-25 09:26:43.448 | 3218237754 |               9
 10 | 2010-06-25 09:26:44.027 | 2010-06-25 09:26:44.027 | 4757111015 |              10
 11 | 2010-06-25 09:26:48.545 | 2010-06-25 09:26:48.545 | 32521027   |              11
(11 rows)




[root@dhcp231-93 ~]# subscription-manager-cli subscribe --regtoken=8157741284
No such token: 8157741284
[root@dhcp231-93 ~]# subscription-manager-cli subscribe --regtoken=9568455619
[root@dhcp231-93 ~]# subscription-manager-cli list
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+

ProductName:        	High availability (cluster suite)
Status:             	Not Installed            
Expires:            	2011-06-24               
Subscription:       	2                        
ContractNumber:        	0                        


ProductName:        	Large File Support (XFS) 
Status:             	Not Installed            
Expires:            	2011-06-24               
Subscription:       	2                        
ContractNumber:        	0                        


ProductName:        	Load Balancing           
Status:             	Not Installed            
Expires:            	2011-06-24               
Subscription:       	2                        
ContractNumber:        	0                        


ProductName:        	RHEL for Physical Servers SVC
Status:             	Not Installed            
Expires:            	2011-06-24               
Subscription:       	2                        
ContractNumber:        	0                        


ProductName:        	Shared Storage (GFS)     
Status:             	Not Installed            
Expires:            	2011-06-24               
Subscription:       	2                        
ContractNumber:        	0                        


ProductName:        	Smart Management (RHN Management & Provisioing & Monitoring)
Status:             	Not Installed            
Expires:            	2011-06-24               
Subscription:       	2                        
ContractNumber:        	0                        

[root@dhcp231-93 ~]# subscription-manager-cli list --consumed
+-------------------------------------------+
    Consumed Product Subscriptions
+-------------------------------------------+


Name:               	High availability (cluster suite)
ContractNumber:       	0                        
SerialNumber:       	2                        
Active:             	True                     
Begins:             	2010-06-24               
Expires:            	2011-06-24               


Name:               	RHEL for Physical Servers SVC
ContractNumber:       	0                        
SerialNumber:       	2                        
Active:             	True                     
Begins:             	2010-06-24               
Expires:            	2011-06-24               


Name:               	Shared Storage (GFS)     
ContractNumber:       	0                        
SerialNumber:       	2                        
Active:             	True                     
Begins:             	2010-06-24               
Expires:            	2011-06-24               


Name:               	Smart Management (RHN Management & Provisioing & Monitoring)
ContractNumber:       	0                        
SerialNumber:       	2                        
Active:             	True                     
Begins:             	2010-06-24               
Expires:            	2011-06-24               


Name:               	Large File Support (XFS) 
ContractNumber:       	0                        
SerialNumber:       	2                        
Active:             	True                     
Begins:             	2010-06-24               
Expires:            	2011-06-24               


Name:               	Load Balancing           
ContractNumber:       	0                        
SerialNumber:       	2                        
Active:             	True                     
Begins:             	2010-06-24               
Expires:            	2011-06-24               

[root@dhcp231-93 ~]#