Bug 1962681

Summary: OSP 16.2 validations extra-var and extra-env-vars are mutually exclusive
Product: Red Hat OpenStack Reporter: David Rosenfeld <drosenfe>
Component: python-tripleoclientAssignee: Gaƫl Chamoulaud <gchamoul>
Status: CLOSED ERRATA QA Contact: David Rosenfeld <drosenfe>
Severity: medium Docs Contact:
Priority: medium    
Version: 16.2 (Train)CC: gchamoul, hbrock, jslagle, mburns
Target Milestone: rcKeywords: Triaged
Target Release: 16.2 (Train on RHEL 8.4)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-tripleoclient-12.5.1-2.20210527084820.0a0296f.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1962688 (view as bug list) Environment:
Last Closed: 2021-09-15 07:15:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version: Train
Embargoed:
Bug Depends On:    
Bug Blocks: 1962688    

Description David Rosenfeld 2021-05-20 13:29:37 UTC
Description of problem: extra-vars and extra-env-vars are mutually exclusive:

openstack tripleo validator run --static-inventory /home/stack/inventory.yaml --validation check-cpu --extra-vars minimal_cpu_count=1 --extra-env-vars ANSIBLE_STDOUT_CALLBACK=default
usage: openstack tripleo validator run [--plan PLAN] [--ssh-user SSH_USER]
                                       [--limit LIMIT]
                                       [--python-interpreter PYTHON_INTERPRETER]
                                       [--static-inventory STATIC_INVENTORY]
                                       [--extra-vars key1=<val1>[,key2=val2 --extra-vars key3=<val3>]
                                       | --extra-vars-file EXTRA_VARS_FILE |
                                       --extra-env-vars key1=<val1>[,key2=val2
                                       --extra-env-vars key3=<val3>]]
                                       (--validation <validation_id>[,<validation_id>,...] | --group <group>[,<group>,...])
openstack tripleo validator run: error: argument --extra-env-vars: not allowed with argument --extra-vars


There are cases like the one above where users need to specify both extra-vars and extra-env-vars

Version-Release number of selected component (if applicable): RHOS-16.2-RHEL-8-20210514.n.0


How reproducible: Every time


Steps to Reproduce:
1. Execute command: openstack tripleo validator run --static-inventory /home/stack/inventory.yaml --validation check-cpu --extra-vars minimal_cpu_count=1 --extra-env-vars ANSIBLE_STDOUT_CALLBACK=default
2.
3.

Actual results: Error: openstack tripleo validator run: error: argument --extra-env-vars: not allowed with argument --extra-vars occurrs


Expected results: Validator executes successfully


Additional info:

Comment 7 David Rosenfeld 2021-06-15 18:13:07 UTC
The validator from the description executes successfully:

openstack tripleo validator run --static-inventory /home/stack/inventory.yaml --validation check-cpu --extra-vars minimal_cpu_count=1 --extra-env-vars ANSIBLE_STDOUT_CALLBACK=default
Running Validations without Overcloud settings.

PLAY [localhost] ***************************************************************

TASK [check_cpu : Gather facts] ************************************************
Tuesday 15 June 2021  18:11:56 +0000 (0:00:00.032)       0:00:00.032 ********** 
ok: [localhost]

TASK [check_cpu : Verify the number of CPU cores] ******************************
Tuesday 15 June 2021  18:11:57 +0000 (0:00:00.721)       0:00:00.753 ********** 
ok: [localhost]

PLAY RECAP *********************************************************************
localhost                  : ok=2    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
Tuesday 15 June 2021  18:11:57 +0000 (0:00:00.111)       0:00:00.865 ********** 
=============================================================================== 
check_cpu : Gather facts ------------------------------------------------ 0.72s
check_cpu : Verify the number of CPU cores ------------------------------ 0.11s
+--------------------------------------+-------------+--------+------------+----------------+-------------------+-------------+
| UUID                                 | Validations | Status | Host_Group | Status_by_Host | Unreachable_Hosts | Duration    |
+--------------------------------------+-------------+--------+------------+----------------+-------------------+-------------+
| 509f50e7-8e96-4fe1-94bb-96b7aa7caa47 | check-cpu   | PASSED | localhost  | localhost      |                   | 0:00:00.844 |
+--------------------------------------+-------------+--------+------------+----------------+-------------------+-------------+

Comment 9 errata-xmlrpc 2021-09-15 07:15:04 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 (Red Hat OpenStack Platform (RHOSP) 16.2 enhancement 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/RHEA-2021:3483