nova-manage cell_v2 verify_instance has unnecessary uuid check

Bug #1656479 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Matt Riedemann
Newton
Confirmed
Low
Unassigned

Bug Description

The nova-manage cell_v2 verify_instance command has a check to see if the uuid argument is not provided and then fails, breaking it's own rule about not printing anything if --quiet is used. However, it doesn't even need that check because argparse will handle the validation of --uuid not being provided:

https://github.com/openstack/nova/blob/a18f601753f92ff4a2a42be0962a188f583bbfb9/nova/cmd/manage.py#L1338

stack@ocata:~$ nova-manage cell_v2 verify_instance --quiet
usage: nova-manage cell_v2 verify_instance [-h] --uuid <uuid> [--quiet]
nova-manage cell_v2 verify_instance: error: argument --uuid is required
stack@ocata:~$ echo $?
2

Matt Riedemann (mriedem)
Changed in nova:
assignee: nobody → Matt Riedemann (mriedem)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/420261

Changed in nova:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/420261
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=a649311af7d01335aa7cf00fc180ba35ee77f6f3
Submitter: Jenkins
Branch: master

commit a649311af7d01335aa7cf00fc180ba35ee77f6f3
Author: Matt Riedemann <email address hidden>
Date: Fri Jan 13 20:42:11 2017 -0500

    Remove redundant arg check in nova-manage cell_v2 verify_instance

    argparse will validate that the --uuid is provided, we don't need
    an explicit manual check for that in the code, plus the manual
    check was violating the --quiet option by printing out an error
    message anyway.

    This also removes the unit test which we don't really need as
    argparse is going to do it's job.

    Change-Id: Id1cb79c9be8ff6b94f5a7fcab99e960ad774ceac
    Closes-Bug: #1656479

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 15.0.0.0b3

This issue was fixed in the openstack/nova 15.0.0.0b3 development milestone.

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.