nova-manage stack trace when a usage message should be emitted

Bug #1091403 reported by Michael Still
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Critical
Michael Still

Bug Description

$ bin/nova-manage service enable
Enable scheduling for a service
2012-12-18 06:56:21 CRITICAL nova [-] global name 'parser' is not defined
2012-12-18 06:56:21 TRACE nova Traceback (most recent call last):
2012-12-18 06:56:21 TRACE nova File "bin/nova-manage", line 1147, in <module>
2012-12-18 06:56:21 TRACE nova main()
2012-12-18 06:56:21 TRACE nova File "bin/nova-manage", line 1135, in main
2012-12-18 06:56:21 TRACE nova parser.print_help()
2012-12-18 06:56:21 TRACE nova NameError: global name 'parser' is not defined
2012-12-18 06:56:21 TRACE nova

This is obviously a pretty big deal for usability.

Tags: ops
Changed in nova:
status: Triaged → In Progress
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

Michael, seems like a quick patch...want me to take care of this?

diff --git a/bin/nova-manage b/bin/nova-manage
index c761ff6..7e3c142 100755
--- a/bin/nova-manage
+++ b/bin/nova-manage
@@ -1132,7 +1132,7 @@ def main():
         cliutils.validate_args(fn, *fn_args, **fn_kwargs)
     except cliutils.MissingArgs as e:
         print fn.__doc__
- parser.print_help()
+ CONF.print_help()
         print e
         sys.exit(1)
     try:

Revision history for this message
Michael Still (mikal) wrote :

I already have https://review.openstack.org/#/c/18258/ out for review for this one.

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

Weird, that the review did not trigger a comment in this bug report. thanks!

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/18258
Committed: http://github.com/openstack/nova/commit/e865f120012c087b386d69bd47f82a5222c4677e
Submitter: Jenkins
Branch: master

commit e865f120012c087b386d69bd47f82a5222c4677e
Author: Michael Still <email address hidden>
Date: Tue Dec 18 07:11:36 2012 +1100

    Fix stack trace on incorrect nova-manage args.

    This error reporting needs more work, but this at least stops us
    from presenting a stack trace to the user and is as broken as
    before.

    Resolves bug 1091403.

    Change-Id: I941983b60cc3762a916d57b7ea67264e093cfa44

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-2 → 2013.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.