| Summary: | function 'a - add a new Red Hat content repository' doesn't check whether the RH certificate file exists | ||
|---|---|---|---|
| Product: | Red Hat Update Infrastructure for Cloud Providers | Reporter: | Irina Gulina <igulina> |
| Component: | Tools | Assignee: | RHUI Bug List <rhui-bugs> |
| Status: | CLOSED ERRATA | QA Contact: | Vratislav Hutsky <vhutsky> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 3.0.0 | CC: | bkearney, mkubik, mminar, pcreech |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-11-07 14:05:07 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: | |
|
Description
Irina Gulina
2016-04-08 16:29:30 UTC
The behavior has changed after the latest update. There are two scenarios, but both begin like this:
1. upload the cert
2. delete the uploaded cert in another shell (keeping rhui-manager running)
Scenario A:
3. go back to the home screen
4. open the repo management screen
5. enter "a"
What happens now is:
"An unexpected error has occurred during the last operation.
More information can be found in /root/.rhui/rhui.log."
The rhui.log file then reads:
2018-05-21 06:48:24,739 - Unexpected error caught at the shell level
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/rhui/tools/shell.py", line 92, in safe_listen
self.listen(clear=first_run)
File "/usr/lib/python2.7/site-packages/rhui/tools/shell.py", line 131, in listen
Shell.listen(self)
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 136, in add
translation_errors = self.candidate_repo_manager.translate_entitlements()
File "/usr/lib/python2.7/site-packages/rhui/tools/repo_candidates.py", line 129, in translate_entitlements
e.download_url, cert.cert_filename)
File "/usr/lib/python2.7/site-packages/rhui/tools/cdn_api.py", line 97, in expand_variables
substitutions = self.get(listing_url, cert_filename).split('\n')
File "/usr/lib/python2.7/site-packages/rhui/tools/cdn_api.py", line 150, in get
cert=cert_filename, verify=redhat_ca_path)
File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 476, in get
return self.request('GET', url, **kwargs)
File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 464, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 576, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 370, in send
timeout=timeout
File "/usr/lib/python2.7/site-packages/urllib3/connectionpool.py", line 544, in urlopen
body=body, headers=headers)
File "/usr/lib/python2.7/site-packages/urllib3/connectionpool.py", line 341, in _make_request
self._validate_conn(conn)
File "/usr/lib/python2.7/site-packages/urllib3/connectionpool.py", line 762, in _validate_conn
conn.connect()
File "/usr/lib/python2.7/site-packages/urllib3/connection.py", line 238, in connect
ssl_version=resolved_ssl_version)
File "/usr/lib/python2.7/site-packages/urllib3/util/ssl_.py", line 254, in ssl_wrap_socket
context.load_cert_chain(certfile, keyfile)
IOError: [Errno 2] No such file or directory
That's better than what rhui-manager used to do, but not perfect.
Scenario B:
3. (assuming you're still on the entitlements screen; if not, go there) enter "l"
You get:
"No Red Hat entitlements found."
4. go back to the home screen
5. open the repo management screen
6. enter "a"
You get:
"No Red Hat content certificates have been loaded. Upload
a content certificate to provide entitled products for import."
So it seems that the "list Red Hat content certificate entitlements" action reloads the list, rhui-manager realizes that the list is empty, and attempts to add a repo are correctly rejected thanks to this updated information. Looks like this checking should be done every time one tries to add a repo.
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. https://access.redhat.com/errata/RHBA-2018:3520 |