Bug 1756392

Summary: Support syntax validation on '--hint' parameters in 'nova boot'
Product: Red Hat OpenStack Reporter: Stephen Finucane <stephenfin>
Component: python-novaclientAssignee: Stephen Finucane <stephenfin>
Status: CLOSED ERRATA QA Contact: OSP DFG:Compute <osp-dfg-compute>
Severity: low Docs Contact:
Priority: low    
Version: 10.0 (Newton)CC: amcleod, apevec, dasmith, eglynn, jhakimra, jpichon, kchamart, lhh, lyarwood, mbooth, msufiyan, mwitt, nlevinki, sbauza, sgordon, srevivo, stephenfin
Target Milestone: z2Keywords: Patch, Triaged, ZStream
Target Release: 15.0 (Stein)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-novaclient-13.0.1-0.20190710173536.ef842ca.el8ost Doc Type: Bug Fix
Doc Text:
With this update, the 'nova boot' command now validates the argument for the '--hint' option. This option expects a key-value argument. Previously, incorrectly formatted arguments were ignored silently, causing confusing behavior.
Story Points: ---
Clone Of: 1541239
: 1757880 (view as bug list) Environment:
Last Closed: 2020-03-05 11:54:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1757880, 1757881    

Description Stephen Finucane 2019-09-27 14:16:33 UTC
This is the novaclient clone of the openstackclient bug. Both CLIs are affected by the same bug.

+++ This bug was initially created as a clone of Bug #1541239 +++

1. Description

Support for adding validation check while using openstack server create ... --hint command

2. Use case

An error in "openstack server create" filters specifcation (used uuid of group instead of "group=<uuid>"/ "key=value") format led to openstack accepting the value and not reporting any error.

However, it did not carry out the expected action.

A syntax check on the filter format could have helped user avoid several hours of troubleshooting

~~~
"openstack server create" command accepts hints in the format "key=value".
However no syntax validation is done leading to accepting values in incorrect format without reporting any error and user assuming filter got applied

Following works fine without error:

openstack server create ...  --hint 245e1dfe-2d0e-4139-80a9-fce124948896 --wait

It should actually be:
openstack server create ... --hint group=245e1dfe-2d0e-4139-80a9-fce124948896 --wait

Suggest adding validation check to the command so that hints are not accepted without key=value format

~~~

3. Upstream reference
        Bugzillas? No
        Blueprints? No
        Specs? No

4. RH bugzilla dependencies?
   No

5. Primary Red Hat contact:
   a. Name:  MD Sufiyan
   b. Email:   msufiyan

Comment 7 errata-xmlrpc 2020-03-05 11:54:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:0711