Bug 837447 - subscription-manager repos --list regression when not registered
subscription-manager repos --list regression when not registered
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager (Show other bugs)
5.9
Unspecified Unspecified
unspecified Severity medium
: rc
: ---
Assigned To: Bryan Kearney
Entitlement Bugs
: Regression
: 843999 (view as bug list)
Depends On:
Blocks: 771748
  Show dependency treegraph
 
Reported: 2012-07-03 18:47 EDT by John Sefler
Modified: 2013-01-10 06:02 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-07 22:56:22 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Sefler 2012-07-03 18:47:58 EDT
Description of problem:
When not registered, a call to "subscription-manager repos --list" used to gracefully return:
The system is not entitled to use any repositories.


Version-Release number of selected component (if applicable):
[root@jsefler-59server ~]# rpm -q subscription-manager
subscription-manager-1.0.7-1.git.10.4c364f3.el5


How reproducible:


Steps to Reproduce:
[root@jsefler-59server ~]# subscription-manager repos --list

[Errno 2] No such file or directory: '/etc/pki/consumer/key.pem'

[root@jsefler-59server ~]# tail -f /var/log/rhsm/rhsm.log
2012-07-03 18:43:53,110 [ERROR]  @certlib.py:261 - [Errno 2] No such file or directory: '/etc/pki/consumer/key.pem'
2012-07-03 18:43:53,112 [ERROR]  @managercli.py:113 - exception caught in subscription-manager
2012-07-03 18:43:53,113 [ERROR]  @managercli.py:114 - [Errno 2] No such file or directory: '/etc/pki/consumer/key.pem'
Traceback (most recent call last):
  File "/usr/sbin/subscription-manager", line 78, in ?
    sys.exit(abs(main() or 0))
  File "/usr/sbin/subscription-manager", line 69, in main
    return managercli.CLI().main()
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 1954, in main
    return cmd.main()
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 399, in main
    return_code = self._do_command()
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 1489, in _do_command
    certmgr.update()
  File "/usr/share/rhsm/subscription_manager/certmgr.py", line 85, in update
    updates += lib.update()
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 61, in update
    return self._do_update()
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 167, in _do_update
    idcert = ConsumerIdentity.read()
  File "/usr/share/rhsm/subscription_manager/certlib.py", line 350, in read
    f = open(cls.keypath())
IOError: [Errno 2] No such file or directory: '/etc/pki/consumer/key.pem'




Expected results:
[root@rhsm-compat-rhel63 ~]# subscription-manager repos --list
The system is not entitled to use any repositories.
Comment 2 James Bowes 2012-07-06 06:46:44 EDT
Appears fixed in master, 77471557
Comment 3 Sharath Dwaral 2012-07-09 18:47:30 EDT
Version :

# rpm -qa | egrep "subscription-manager|python-rhsm"
subscription-manager-gui-1.0.8-1.git.14.dfc8438.el5
python-rhsm-1.0.3-1.git.0.583d26c.el5
subscription-manager-firstboot-1.0.8-1.git.14.dfc8438.el5
subscription-manager-1.0.8-1.git.14.dfc8438.el5
subscription-manager-migration-data-1.11.2.2-1.git.0.2eea155.el5
subscription-manager-migration-1.0.8-1.git.14.dfc8438.el5

Findings:

# subscription-manager register --org admin
Username: testuser1
Password: 
The system has been registered with id: 8779f7cb-4f07-41b3-bd0b-bdfcd164104d 
# subscription-manager repos --list
The system is not entitled to use any repositories.

# subscription-manager unregister
System has been un-registered.
# subscription-manager repos --list

[Errno 2] No such file or directory: '/etc/pki/consumer/key.pem'


Moving back to ASSIGNED/ FailedQA
Comment 4 RHEL Product and Program Management 2012-07-09 18:48:29 EDT
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.
Comment 6 John Sefler 2012-07-27 15:59:31 EDT
*** Bug 843999 has been marked as a duplicate of this bug. ***
Comment 7 John Sefler 2012-07-28 09:45:07 EDT
Appears fixed again in...
[root@jsefler-rhel59 ~]# rpm -q subscription-manager
subscription-manager-1.0.11-1.git.3.b3c4a8b.el5

[root@jsefler-rhel59 ~]# subscription-manager unregister
This system is currently not registered.
[root@jsefler-rhel59 ~]# subscription-manager repos --list
The system is not entitled to use any repositories.
[root@jsefler-rhel59 ~]# subscription-manager repos
The system is not entitled to use any repositories.
[root@jsefler-rhel59 ~]#
Comment 8 Sharath Dwaral 2012-07-30 15:42:08 EDT
Version:

# rpm -qa | egrep "subscription-manager|pythin-rhsm"
subscription-manager-gui-1.0.11-1.git.3.b3c4a8b.el5
subscription-manager-1.0.11-1.git.3.b3c4a8b.el5
subscription-manager-migration-data-1.11.2.2-1.git.2.c3c8e22.el5
subscription-manager-firstboot-1.0.11-1.git.3.b3c4a8b.el5
subscription-manager-migration-1.0.11-1.git.3.b3c4a8b.el5

Verification:

# subscription-manager register --org admin
Username: testuser1
Password: 
The system has been registered with id: b5e1e2a1-49d2-41c2-800e-0a0c6e756017 

# subscription-manager repos --list
The system is not entitled to use any repositories.

# subscription-manager repos
The system is not entitled to use any repositories.

# subscription-manager unregister
System has been un-registered.

# subscription-manager repos --list
The system is not entitled to use any repositories.

# subscription-manager repos
The system is not entitled to use any repositories.

Moving bug to VERIFIED
Comment 10 errata-xmlrpc 2013-01-07 22:56:22 EST
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-2013-0033.html

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