Project

Profile

Help

Issue #1694

closed

pulp-admin does not show error messages unless the user specifies the -v flag

Added by rbarlow about 8 years ago. Updated about 5 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

The -v flag was supposed to enable debug messaging, but when it was implemented it also caused pulp-admin error messages (such as tracebacks) to be hidden from the user. This is not useful, particular when debugging intermittent problems. Any unhandled Exceptions should print the error message and traceback to the user because that is a crash bug and we need to fix it. The current behavior is not helpful and can make debugging intermittent problems much more difficult than they already are:

$ pulp-admin docker repo search image --repo-id 3742cb9b-ff6f-4f88-a271-f83ae8c88e52 --fields unit_id
An unexpected error has occurred. More information may be found using the -v
flag.

This output should happen without the -v:

$ pulp-admin -v docker repo search image --repo-id 3742cb9b-ff6f-4f88-a271-f83ae8c88e52 --fields unit_id
2016-02-18 18:43:54,947 - 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_docker/extensions_admin/pulp_docker/extensions/admin/images.py", line 106, in run
    image_id = image[u'metadata'][u'image_id']
KeyError: u'image_id'
An unexpected error has occurred. More information may be found using the -v
flag.

Additionally, it is silly that pulp-admin tells users to use the -v flag when they did use the -v flag.

The example problems I've supplied are from another bug I've filed, see #1693 if you are interested in that.

Actions #1

Updated by amacdona@redhat.com about 8 years ago

"Additionally, it is silly that pulp-admin tells users to use the -v flag when they did use the -v flag."

This issue is already open: https://pulp.plan.io/issues/752

You tempt me to relate the two :)

Actions #2

Updated by rbarlow about 8 years ago

Pulp wrote:

You tempt me to relate the two :)

lol

--
Randy Barlow
irc: bowlofeggs

Actions #3

Updated by ipanova@redhat.com about 8 years ago

I think the -vv enables debug messaging. At least we state so:

pulp-admin --help

  -v                    enables verbose output; use twice for increased
                        verbosity with debug information
Actions #4

Updated by mhrivnak about 8 years ago

  • Triaged changed from No to Yes

Consider dumping the error details out to a text file rather than on screen.

Actions #5

Updated by bmbouter about 8 years ago

Why don't we send pulp-admin error messages to stderr without any extra -v or -vv flags specified?

Actions #6

Updated by rbarlow about 8 years ago

Pulp wrote:

Consider dumping the error details out to a text file rather than on screen.

We have these flags because we specifically wanted to get away from that behavior. Also, it is much easier for users to report a crash to us if we give them all the info we need to help them right away. Remember, this is a crash situation not a minor bug. It's also annoying to me as a developer that I have to go look in a different place when a crash happens.

Actions #7

Updated by rbarlow about 8 years ago

bmbouter wrote:

Why don't we send pulp-admin error messages to stderr without any extra -v or -vv flags specified?

+1 to stderr. Just to add a point of clarification, we still want/need to -v flag for debug info outside of crashes.

Actions #8

Updated by bmbouter about 5 years ago

  • Status changed from NEW to CLOSED - WONTFIX
Actions #9

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.

Actions #10

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF