Bug 617277

Summary: subscription-manager unregister not removing key.pem
Product: Red Hat Enterprise Linux 6 Reporter: wes hayutin <whayutin>
Component: subscription-managerAssignee: Pradeep Kilambi <pkilambi>
Status: CLOSED WORKSFORME QA Contact: wes hayutin <whayutin>
Severity: medium Docs Contact:
Priority: low    
Version: 6.1CC: bkearney, jsefler, shaines
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-05 20:16:51 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:
Bug Depends On:    
Bug Blocks: 568421    

Description wes hayutin 2010-07-22 16:21:02 UTC
[root@oldceremony ~]# subscription-manager-cli unregister
[root@oldceremony ~]# subscription-manager-cli register --username=pascal.catric --pass=redhat 
This system is already registered. Use --force to override
[root@oldceremony ~]# rpm -q subscription-manager
subscription-manager-0.71-1.el6.i686
[root@oldceremony ~]# ls /etc/pki/entitlement/product/
[root@oldceremony ~]# ls /etc/pki/entitlement/
key.pem  product
[root@oldceremony ~]#

Comment 1 Bryan Kearney 2010-08-03 21:18:02 UTC
Aainst latest (8cfc68209b2286a3738c6656b189d992ebf4b158) did the following:

./rhsm/subscription-manager-cli register --username admin --password admin --force
./rhsm/subscription-manager-cli subscribe --pool=3
ls /etc/pki/entitlement/ (see key.pem)
./rhsm/subscription-manager-cli unregister
ls /etc/pki/entitlement/ 

Directory does not exist.

Comment 2 wes hayutin 2010-08-09 21:49:41 UTC
I see this periodically, leaving on_qa

Comment 3 John Sefler 2010-09-08 16:04:25 UTC
I WAS NOT ABLE TO REPRODUCE THIS BUG.  THE unregister IS REMOVING THE key.pem.
Leaving ON_QA for now since Comment #2 claims to see this periodically.

[root@jsefler-rhel6-client01 ~]# rpm -q subscription-manager
subscription-manager-0.75-1.git.29.c3b1d88.fc12.i386


[root@jsefler-rhel6-client01 ~]# ls /etc/pki/entitlement
product
[root@jsefler-rhel6-client01 ~]# ls /etc/pki/entitlement/product/
[root@jsefler-rhel6-client01 ~]# subscription-manager-cli register --username=admin --password=admin
97d030fc-cbf4-467b-9b3c-3446decc392a admin
[root@jsefler-rhel6-client01 ~]# ls /etc/pki/entitlement/
product
[root@jsefler-rhel6-client01 ~]# ls /etc/pki/entitlement/product/
[root@jsefler-rhel6-client01 ~]# subscription-manager-cli subscribe --pool=3
[root@jsefler-rhel6-client01 ~]# ls /etc/pki/entitlement/
key.pem  product
[root@jsefler-rhel6-client01 ~]# ls /etc/pki/entitlement/product/
173.pem
[root@jsefler-rhel6-client01 ~]# subscription-manager-cli unregister
[root@jsefler-rhel6-client01 ~]# ls /etc/pki/entitlement/
ls: cannot access /etc/pki/entitlement/: No such file or directory
[root@jsefler-rhel6-client01 ~]# subscription-manager-cli register --username=admin --password=admin
4a7549b2-d59c-41cd-bf76-993f43f35f57 admin
[root@jsefler-rhel6-client01 ~]# ls /etc/pki/entitlement/
product
[root@jsefler-rhel6-client01 ~]#

Comment 4 Jeff Weiss 2010-10-05 20:16:51 UTC
I cannot reproduce this either.  Closing.