Bug 602852 - standalone Candlepin: unbind by certificate serial fails
Summary: standalone Candlepin: unbind by certificate serial fails
Status: RELEASE_PENDING
Alias: None
Product: Candlepin
Classification: Community
Component: candlepin
Version: 0.5
Hardware: All
OS: Linux
low
high
Target Milestone: ---
: ---
Assignee: Adrian Likins
QA Contact: Katello QA List
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-10 21:28 UTC by Steve Salevan
Modified: 2015-05-14 15:23 UTC (History)
2 users (show)

(edit)
Clone Of:
(edit)
Last Closed:


Attachments (Terms of Use)

Description Steve Salevan 2010-06-10 21:28:25 UTC
Description of problem:
If a user attempts to unsubscribe from an entitlement certificate using the serial number, the following error will occur:

201006101723:47.989 - FINE: ssh root@client /usr/sbin/subscription-manager-cli unsubscribe --serial="5" (com.redhat.qe.tools.SSHCommandRunner.run)
201006101723:48.657 - FINE: Stderr: access denied.
 (com.redhat.qe.tools.SSHCommandRunner.runCommandAndWait)
201006101723:48.663 - FINE: Stdout: /consumers/3e8e6a31-a202-493d-89fd-b103c81653d4/certificates/5
 (com.redhat.qe.tools.SSHCommandRunner.runCommandAndWait)

Version-Release number of selected component (if applicable):
standalone Candlepin, git HEAD, 6/10/10

How reproducible:
Always

Steps to Reproduce:
1. Register a client to a Candlepin server
2. Subscribe to an entitlement pool
3. Attempt to unsubscribe from the pool's corresponding entitlement certificate in a manner similar to that above
  
Actual results:
As above

Expected results:
Unbind by certificate serial number succeeds

Additional info:

Comment 1 Adrian Likins 2010-06-11 14:47:33 UTC
So far I haven't been able to reproduce this with head candlepin and subscription-manager. 

[adrian@alikins proxy]$ sudo rm -rf /etc/pki/consumer/* /etc/pki/entitlement/product/*; sudo subscription-manager-cli register --username admin --password admin --force
Error reading system cpu information: <type 'exceptions.ValueError'>
b3682bdf-9c70-438c-bbfc-74ba66782b6b admin admin
[adrian@alikins proxy]$ sudo subscription-manager-cli list --consumed
No Consumed subscription pools to list
[adrian@alikins proxy]$ sudo subscription-manager-cli subscribe --pool 13
[adrian@alikins proxy]$ sudo subscription-manager-cli list --consumed
+-------------------------------------------+
    Consumed Product Subscriptions
+-------------------------------------------+


Name:               	RHEL for Physical Servers SVC
ContractNumber:       	6                        
SerialNumber:       	None                     
Active:             	True                     
Begins:             	2007-07-12               
Expires:            	2012-07-12               


Name:               	RHEL for Premium Architectures SVC
ContractNumber:       	6                        
SerialNumber:       	None                     
Active:             	True                     
Begins:             	2007-07-12               
Expires:            	2012-07-12               

[adrian@alikins proxy]$ ls /etc/pki/entitlement/product/
6.pem
[adrian@alikins proxy]$ sudo subscription-manager-cli unsubscribe --serial 6
/consumers/b3682bdf-9c70-438c-bbfc-74ba66782b6b/certificates/6
[adrian@alikins proxy]$ sudo subscription-manager-cli list --consumed
No Consumed subscription pools to list

Comment 5 spandey 2010-07-16 13:39:16 UTC
Verified with following setup 

candlepin : on-premises (10.65.201.190)
client : Rhel6 with sm version 67

steps to repro :

[root@sachrhel6 ~]# subscription-manager-cli unsubscribe --serial=37

/consumers/a2a4d143-79ab-4640-aa80-99cf00674760/certificates/37

[root@sachrhel6 ~]# subscription-manager-cli list --consumed

No Consumed subscription pools to list

[root@sachrhel6 ~]# 



Working fine 
changing defect status from ON_QA to Verified

Comment 6 John Sefler 2011-05-04 14:40:33 UTC
Group move of VERIFIED Candlepin component bugs to RELEASE_PENDING


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