Issue #961
closedpulp-admin should print SSL errors without requiring -v
Description
Right now, if you have a certificate mismatch, you will see this:
$ pulp-admin rpm repo create --repo-id test
An error occurred attempting to contact the server. More information may be
found using the -v flag.
With -v, we can see that the error is that my client cert wasn't signed by the correct CA:
$ pulp-admin -v rpm repo create --repo-id test
2015-05-07 20:14:45,758 - ERROR - Client-side exception occurred
Traceback (most recent call last):
File "/home/vagrant/devel/pulp/client_lib/pulp/client/extensions/core.py", line 474, in run
exit_code = Cli.run(self, args)
File "/usr/lib/python2.7/site-packages/okaara/cli.py", line 974, in run
exit_code = command_or_section.execute(self.prompt, remaining_args)
File "/home/vagrant/devel/pulp/client_lib/pulp/client/extensions/extensions.py", line 210, in execute
return self.method(*arg_list, **clean_kwargs)
File "/home/vagrant/devel/pulp_rpm/extensions_admin/pulp_rpm/extensions/admin/repo_create_update.py", line 123, in run
ids.TYPE_ID_IMPORTER_YUM, importer_config, distributors
File "/home/vagrant/devel/pulp/bindings/pulp/bindings/repository.py", line 81, in create_and_configure
return self.server.POST(path, repo_data)
File "/home/vagrant/devel/pulp/bindings/pulp/bindings/server.py", line 97, in POST
return self._request('POST', path, body=body, ensure_encoding=ensure_encoding)
File "/home/vagrant/devel/pulp/bindings/pulp/bindings/server.py", line 141, in _request
response_code, response_body = self.server_wrapper.request(method, url, body)
File "/home/vagrant/devel/pulp/bindings/pulp/bindings/server.py", line 332, in request
raise exceptions.ConnectionException(None, str(err), None)
ConnectionException: (None, 'tlsv1 alert decrypt error', None)
An error occurred attempting to contact the server. More information may be
found using the -v flag.
It would have been more helpful if the 'tlsv1 alert decrypt error' message had been printed without -v instead of such a generic message.
Updated by rbarlow almost 9 years ago
- Triaged changed from Yes to No
Additionally, this particular error should not show a traceback, even with -v. It's an expected condition. Tracebacks should only happen for unexpected conditions, and they should be printed immediately without the -v flag.
Updated by bmbouter about 5 years ago
- Status changed from NEW to CLOSED - WONTFIX
Updated by bmbouter about 5 years ago
Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.