← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1656479] [NEW] nova-manage cell_v2 verify_instance has unnecessary uuid check

 

Public bug reported:

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

** Affects: nova
     Importance: Low
     Assignee: Matt Riedemann (mriedem)
         Status: Triaged


** Tags: cells nova-manage

** Changed in: nova
     Assignee: (unassigned) => Matt Riedemann (mriedem)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1656479

Title:
  nova-manage cell_v2 verify_instance has unnecessary uuid check

Status in OpenStack Compute (nova):
  Triaged

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

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1656479/+subscriptions


Follow ups