Bug 847080
| Summary: | rhui-manager status traceback with expired user certificate | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Update Infrastructure for Cloud Providers | Reporter: | mkovacik | ||||
| Component: | Tools | Assignee: | James Slagle <jslagle> | ||||
| Status: | CLOSED ERRATA | QA Contact: | mkovacik | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | high | ||||||
| Version: | 2.1 | CC: | achan, juwu, tsanders, vkuznets, whayutin | ||||
| Target Milestone: | --- | ||||||
| Target Release: | 2.1.1 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| 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 16:59:23 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: | |||||||
| Attachments: |
|
||||||
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.. :)
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 [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. 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 |
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