Bug 977850

Summary: Preferences dialog errors out when unregistered in subscription-manager-gui
Product: Red Hat Enterprise Linux 5 Reporter: J.C. Molet <jmolet>
Component: subscription-managerAssignee: Bryan Kearney <bkearney>
Status: CLOSED ERRATA QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 5.10CC: bkearney, fsharath, jdornak, jesusr
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
No description necessary
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-30 23:11:28 UTC Type: Bug
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: 840995    
Attachments:
Description Flags
preference dialog none

Description J.C. Molet 2013-06-25 13:14:29 UTC
Description of problem:
The preferences dialog errors out when unregistered in subscription-manager-gui.

Version-Release number of selected component (if applicable):
[root@jmolet-vm0 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 0.8.15-1
subscription-manager: 1.8.11-1.git.12.6650553.el5
python-rhsm: 1.8.12-1.git.0.d747a65.el5


How reproducible:
always

Steps to Reproduce:
1. Start up subscription-manager-gui
2. Assert that you are unregistered
3. Go to System > Preferences

Actual results:
Error dialog shows "Error in preferences dialog. Please see /var/log/rhsm/rhsm.log for more information."

log shows:

2013-06-25 09:05:35,656 [DEBUG]  @connection.py:394 - Loading CA PEM certificates from: /etc/rhsm/ca/
2013-06-25 09:05:35,657 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/jmolet-cp2.pem'
2013-06-25 09:05:35,657 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2013-06-25 09:05:35,658 [DEBUG]  @connection.py:376 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2013-06-25 09:05:35,658 [DEBUG]  @connection.py:415 - Making request: GET /candlepin/consumers/None
2013-06-25 09:05:35,832 [DEBUG]  @connection.py:434 - Response status: 401
2013-06-25 09:05:35,833 [ERROR]  @utils.py:71 - Invalid credentials.
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/gui/managergui.py", line 325, in _preferences_item_clicked
    self.preferences_dialog.show()
  File "/usr/share/rhsm/subscription_manager/gui/preferences.py", line 196, in show
    self.load_current_settings()
  File "/usr/share/rhsm/subscription_manager/gui/preferences.py", line 86, in load_current_settings
    consumer_json = self.backend.cp_provider.get_consumer_auth_cp().getConsumer(self.identity.uuid)
  File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 734, in getConsumer
    return self.conn.request_get(method)
  File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 481, in request_get
    return self._request("GET", method)
  File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 443, in _request
    self.validateResponse(result)
  File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 468, in validateResponse
    raise RestlibException(response['status'], error_msg)
RestlibException: Invalid credentials.


Expected results:
It would show a friendly/useful "Please register" type of dialog.

Additional info:

Comment 1 RHEL Program Management 2013-06-25 13:18:34 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 2 Cory Scheviak 2013-07-22 20:03:11 UTC
616f50bd49f28051093446f1b7edf83eae13c852

subscription-manager.git

Comment 4 Adrian Likins 2013-07-23 16:58:50 UTC
*** Bug 987078 has been marked as a duplicate of this bug. ***

Comment 5 Sharath Dwaral 2013-07-30 13:05:01 UTC
Created attachment 780648 [details]
preference dialog

Version:

# rpm -qa | egrep "subscription-manager|python-rhsm"
subscription-manager-firstboot-1.8.14-1.el5
subscription-manager-migration-data-1.11.3.1-1.git.1.78afd75.el5
subscription-manager-debuginfo-1.8.14-1.el5
subscription-manager-1.8.14-1.el5
python-rhsm-debuginfo-1.8.15-1.el5
subscription-manager-gui-1.8.14-1.el5
subscription-manager-migration-1.8.14-1.el5
python-rhsm-1.8.15-1.el5

Verification:

See Attachment

When system is registered we see the preference option in System dialog
When the system is unregistered, preference option is not shown in System dialog

VERIFIED

Comment 8 errata-xmlrpc 2013-09-30 23:11:28 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-1332.html