Bug 847080 - rhui-manager status traceback with expired user certificate
rhui-manager status traceback with expired user certificate
Status: CLOSED ERRATA
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: Tools (Show other bugs)
2.1
Unspecified Unspecified
high Severity unspecified
: ---
: 2.1.1
Assigned To: James Slagle
mkovacik
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-09 12:06 EDT by mkovacik
Modified: 2015-06-09 23:59 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
User certificate expirations in a non-interactive mode resulted in traceback errors. This patch adds exception handling into the RHUI CLI script to force the exception. It informs the user that the certificate has expired and rhui-manager needs to be restarted.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-27 11:59:23 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)
Screen log (2.76 KB, text/plain)
2012-08-09 12:06 EDT, mkovacik
no flags Details

  None (edit)
Description mkovacik 2012-08-09 12:06:41 EDT
Created attachment 603299 [details]
Screen log

Description of problem:
The user certificate having expired, rhui-manager trace-backs. That isn't the case when being run in interactive mode. See the screen log attached.

Version-Release number of selected component (if applicable):
RHEL-6.3-RHUI-2.1-20120801.0-Server-x86_64-DVD1.iso

How reproducible:
2 of 2

Steps to Reproduce:
1. wait till user certificate expires
2. rhui-manager status
3. traceback shown
  
Actual results:
Traceback with expired user certificate

Expected results:
The user certificate expiration exception caught the same way as in the interactive mode

Additional info:
See the screen log
Comment 1 wes hayutin 2012-08-10 14:02:31 EDT
username and password can be used to get around the issue


[root@ip-10-191-15-154 ~]# rhui-manager --username admin --password admin status
cds1 ........................................................ [  UP  ]

cds1 ........................................................ [  ERROR  ]
cds2 ........................................................ [  UP  ]

cds2 ........................................................ [  SUCCESS  ]

KeyboardInterrupt

[root@ip-10-191-15-154 ~]# rhui-manager status
Traceback (most recent call last):
  File "/usr/bin/rhui-manager", line 16, in <module>
    rhui.tools.launcher.main()
  File "/usr/lib/python2.6/site-packages/rhui/tools/launcher.py", line 348, in main
    cli.run(args)
  File "/usr/lib/python2.6/site-packages/rhui/common/cli.py", line 272, in run
    command_or_section.execute(remaining_args)
  File "/usr/lib/python2.6/site-packages/rhui/common/cli.py", line 113, in execute
    self.method(**arg_dict)
  File "/usr/lib/python2.6/site-packages/rhui/tools/commands/status.py", line 52, in show
    ret_code = self._status(kwargs['--code'])
  File "/usr/lib/python2.6/site-packages/rhui/tools/commands/status.py", line 61, in _status
    cds_instances = self.pulp.cds_with_sync_status()
  File "/usr/lib/python2.6/site-packages/rhui/tools/pulp_api.py", line 615, in cds_with_sync_status
    cds_list = self.cds_list()
  File "/usr/lib/python2.6/site-packages/rhui/tools/pulp_api.py", line 565, in cds_list
    raise e
pulp.client.api.server.ServerRequestError: (None, 'sslv3 alert certificate expired', None)
You have new mail in /var/spool/mail/root


I say we bump this to 2.1.1, the cli is getting some love.. 
I could patch this now.. but this status code is kind of ugly.. :)
Comment 2 James Slagle 2012-11-29 11:47:52 EST
I'm not sure it's possible to reproduce this given the current code (I couldn't anyway).

Regardless, I added some exception handling for it and was able to test that by changing some other parts of the code to force the exception.

commit 64220383341e15836ca18bac7d943c0f375d38e8
Comment 4 Vitaly Kuznetsov 2013-02-05 11:17:06 EST
[root@rhua ~]# rpm -q rh-rhui-tools
rh-rhui-tools-2.1.15-1.el6_3.noarch

[root@rhua ~]# date 010100002033
Sat Jan  1 00:00:00 EST 2033
[root@rhua ~]# rhui-manager status
The current user's certificate has expired. Restart RHUI Manager
to log in again and retrieve a new certificate.

Couldn't reproduce the bug with old 2.1 setup though.
Comment 6 errata-xmlrpc 2013-02-27 11:59:23 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-0571.html

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