Hide Forgot
Description of problem: In the user scenario where the system is running disconnected and they have imported an entitlement certificate, the cli tool does not allow them to unsubscribe. The command is blocked with a "you need to register before" using this command. This scenario was fixed for the gui tool in bug 723363, but not the cli tool. Version-Release number of selected component (if applicable): [root@jsefler-onprem-62server ~]# rpm -q subscription-manager subscription-manager-0.96.8-1.git.0.125eb68.el6.x86_64 How reproducible: Steps to Reproduce: [root@jsefler-onprem-62server ~]# subscription-manager identity Consumer not registered. Please register using --username and --password [root@jsefler-onprem-62server ~]# subscription-manager import --certificate=/tmp/sm-importCertificatesDir/5614217831278296352.pem Successfully imported certificate 5614217831278296352.pem [root@jsefler-onprem-62server ~]# subscription-manager list --consumed +-------------------------------------------+ Consumed Product Subscriptions +-------------------------------------------+ ProductName: Awesome OS Server Bits ContractNumber: 66 AccountNumber: 12331131231 SerialNumber: 5614217831278296352 Active: True QuantityUsed: 1 Begins: 05/29/2011 Expires: 10/28/2012 [root@jsefler-onprem-62server ~]# subscription-manager unsubscribe --serial=5614217831278296352 Error: You need to register this system by running `register` command before using this option. ^^^ BANG! A client who has just successfully imported an entitlement cert cannot revert his action and unsubscribe using the subscription-manager cli tool.
commit c5843112b4e6a221c1eb95a3abdc800d805324d1 Author: William Poteat <wpoteat> Date: Wed Sep 7 08:49:22 2011 -0400 735338: Subscription Manager CLI tool does not allow unsubscribe when not registered. 735212: Subscription-manager import help should use singular CERTIFICATE-FILE
Verifying Version... [root@jsefler-onprem-62server ~]# rpm -q subscription-manager subscription-manager-0.96.9-1.git.10.adab5e3.el6.x86_64 [root@jsefler-onprem-62server ~]# rpm -q python-rhsm python-rhsm-0.96.11-1.git.8.7061b8a.el6.noarch [root@jsefler-onprem-62server ~]# subscription-manager clean All local data removed [root@jsefler-onprem-62server ~]# subscription-manager import --certificate=/tmp/sm-importCertificatesDir/9196177807768642459.pem Successfully imported certificate 9196177807768642459.pem [root@jsefler-onprem-62server ~]# subscription-manager list --consumed +-------------------------------------------+ Consumed Product Subscriptions +-------------------------------------------+ ProductName: Awesome OS for i686/x86_64 Bits ContractNumber: 45 AccountNumber: 12331131231 SerialNumber: 9196177807768642459 Active: True QuantityUsed: 1 Begins: 09/11/2011 Expires: 09/10/2012 [root@jsefler-onprem-62server ~]# subscription-manager identity Consumer not registered. Please register using --username and --password [root@jsefler-onprem-62server ~]# subscription-manager unsubscribe --serial=9196177807768642459 This machine has been unsubscribed from subscription with serial number 9196177807768642459 [root@jsefler-onprem-62server ~]# subscription-manager list --consumed No Consumed subscription pools to list [root@jsefler-onprem-62server ~]# ^^^ VERIFIED that an unregistered client can unsubscribe from an imported entitlement cert.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2011-1695.html