Bug 1304436 - unknown error and traceback when the login cert get deleted somehow
unknown error and traceback when the login cert get deleted somehow
Status: NEW
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: Tools (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: RHUI Bug List
Vratislav Hutsky
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2016-02-03 10:44 EST by Irina Gulina
Modified: 2018-03-17 03:02 EDT (History)
3 users (show)

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

Attachments (Terms of Use)

  None (edit)
Description Irina Gulina 2016-02-03 10:44:09 EST
Description of problem:

If the user is logged into rhui-manager and the cert get deleted somehow, any further user's commands will return an unknown error with a traceback in logs. 

Version-Release number of selected component (if applicable):
>> rpm -qa '*rhui*'

RHUI ISO 20151013

How reproducible:

Steps to Reproduce:
1. open two terminal windows
2. log into rhui-manager in both terminal windows
3. logout in one of them (i.e. the cert will be deleted)
4. try to list the custom repos or make any other request in the second terminal window, get an error and a traceback

Actual results:

An unexpected error has occurred during the last operation.
More information can be found in /root/.rhui/rhui.log.

2016-02-03 10:36:54,435 - <class 'M2Crypto.SSL.SSLError'>
2016-02-03 10:36:54,435 - Unexpected error caught at the shell level
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/rhui/tools/shell.py", line 88, in safe_listen
  File "/usr/lib/python2.7/site-packages/rhui/tools/shell.py", line 122, in listen
  File "/usr/lib/python2.7/site-packages/rhui/common/shell.py", line 186, in listen
    item.func(*args, **item.kwargs)
  File "/usr/lib/python2.7/site-packages/rhui/tools/screens/repo.py", line 61, in list
    redhat_repos = self.pulp.redhat_repo_list()
  File "/usr/lib/python2.7/site-packages/rhui/tools/pulp_api.py", line 248, in redhat_repo_list
    response = self.repo_group_api.repo_group(GROUP_RED_HAT)
  File "/usr/lib/python2.7/site-packages/pulp/bindings/repo_groups.py", line 93, in repo_group
    return self.server.GET(path)
  File "/usr/lib/python2.7/site-packages/pulp/bindings/server.py", line 91, in GET
    return self._request('GET', path, queries)
  File "/usr/lib/python2.7/site-packages/pulp/bindings/server.py", line 147, in _request
    response_code, response_body = self.server_wrapper.request(method, url, body)
  File "/usr/lib/python2.7/site-packages/pulp/bindings/server.py", line 306, in request
  File "/usr/lib64/python2.7/site-packages/M2Crypto/SSL/Context.py", line 76, in load_cert
    m2.ssl_ctx_use_cert(self.ctx, certfile)
SSLError: No such file or directory

Expected results:
A helpful message maybe like: "The user certificate wasn't found. Please logout and login again."
Comment 4 Patrick Creech 2016-10-31 13:45:26 EDT
After evaluating the situation, there is a large amount of code changes required at this time to intercept all the places this could happen.  

I'm proposing backlogging this issue until we have a more robust exception handling system in place.

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