Bug 837447 - subscription-manager repos --list regression when not registered
Summary: subscription-manager repos --list regression when not registered
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager
Version: 5.9
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Bryan Kearney
QA Contact: Entitlement Bugs
URL:
Whiteboard:
: 843999 (view as bug list)
Depends On:
Blocks: 771748
TreeView+ depends on / blocked
 
Reported: 2012-07-03 22:47 UTC by John Sefler
Modified: 2013-01-10 11:02 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-08 03:56:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0033 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2013-01-08 08:38:27 UTC

Description John Sefler 2012-07-03 22:47:58 UTC
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 10:46:44 UTC
Appears fixed in master, 77471557

Comment 3 Sharath Dwaral 2012-07-09 22:47:30 UTC
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 Program Management 2012-07-09 22:48:29 UTC
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 19:59:31 UTC
*** Bug 843999 has been marked as a duplicate of this bug. ***

Comment 7 John Sefler 2012-07-28 13:45:07 UTC
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 19:42:08 UTC
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-08 03:56:22 UTC
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.