Bug 1541239 - Support syntax validation on '--hint' parameters in 'openstack server create'
Summary: Support syntax validation on '--hint' parameters in 'openstack server create'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-openstackclient
Version: unspecified
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: z2
: 16.0 (Train on RHEL 8.1)
Assignee: Stephen Finucane
QA Contact: nlevinki
URL:
Whiteboard:
: 1541236 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-02 04:28 UTC by MD Sufiyan
Modified: 2021-03-11 17:05 UTC (History)
15 users (show)

Fixed In Version: python-openstackclient-4.0.0-0.20191025160015.aa64eb6.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1756392 (view as bug list)
Environment:
Last Closed: 2020-05-14 12:18:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack Storyboard 2006628 0 None None None 2019-09-27 14:19:30 UTC
OpenStack gerrit 685329 0 None MERGED Stop silently ignoring invalid 'server create --hint' options 2021-01-21 16:19:03 UTC
OpenStack gerrit 685330 0 None MERGED Use 'KeyValueAppendAction' from osc-lib 2021-01-21 16:19:02 UTC
Red Hat Product Errata RHBA-2020:2155 0 None None None 2020-05-14 12:18:58 UTC

Description MD Sufiyan 2018-02-02 04:28:33 UTC
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 1 melanie witt 2018-02-09 16:29:55 UTC
This would be an enhancement to python-novaclient to do some basic input validation.

Comment 3 Stephen Finucane 2019-09-27 12:09:31 UTC
I have patches proposed upstream against both novaclient and openstackclient.

Comment 4 Stephen Finucane 2019-09-27 14:21:50 UTC
*** Bug 1541236 has been marked as a duplicate of this bug. ***

Comment 13 errata-xmlrpc 2020-05-14 12:18:28 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:2155


Note You need to log in before you can comment on or make changes to this bug.