Bug 1887777 - The Validator run CLI doesn't take parameters coming from a file with the --extra-vars-file argument
Summary: The Validator run CLI doesn't take parameters coming from a file with the --e...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-validations-libs
Version: 16.1 (Train)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: z4
: 16.1 (Train on RHEL 8.2)
Assignee: Gaël Chamoulaud
QA Contact: nlevinki
URL:
Whiteboard:
Depends On: 1912879
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-13 10:35 UTC by Gaël Chamoulaud
Modified: 2021-03-17 15:39 UTC (History)
6 users (show)

Fixed In Version: python-tripleoclient-12.3.2-1.20200914164931.el8ost python-validations-libs-1.0.5-1.20200914174431.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-03-17 15:33:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 758372 0 None MERGED Fix parameters management 2021-02-10 15:20:16 UTC
OpenStack gerrit 758770 0 None MERGED [Validator Run] Don't rely on parameter file extension 2021-02-10 15:20:16 UTC
OpenStack gerrit 761056 0 None MERGED Don't rely on parameter file extension for downloading 2021-02-10 15:20:16 UTC
Red Hat Product Errata RHBA-2021:0817 0 None None None 2021-03-17 15:39:05 UTC

Description Gaël Chamoulaud 2020-10-13 10:35:40 UTC
Description of problem:

When running a validation with --extra-vars-file argument, the parameters contained in the file are taken in account during the execution.

Version-Release number of selected component (if applicable):

- python3-tripleoclient-12.3.2-1.20200914164928.el8ost.noarch
- validations-common-1.1.2-1.20200914180304.7f3c565.el8ost.noarch
- python3-validations-libs-1.0.5-1.20200914174429.4a660ec.el8ost.noarch
- openstack-tripleo-validations-11.3.2-1.20200914170825.el8ost.noarch
- python3-ansible-runner-1.3.4-2.el8ar.noarch


How reproducible:

$ openstack tripleo validator run --validation check-cpu
=> The validation should pass

$ openstack tripleo validator show parameter --validation check-cpu --download /tmp/check-cpu.json -f json
$ sed -i 's/\"minimal_cpu_count\": 8/\"minimal_cpu_count\": 120/' /tmp/check-cpu.json

$ openstack tripleo validator run --validation check-cpu --extra-vars-file /tmp/check-cpu.json
=> The validation should fail

Comment 6 David Rosenfeld 2021-01-25 13:30:54 UTC
Verification of this BZ is blocked by: https://bugzilla.redhat.com/show_bug.cgi?id=1912879

Comment 10 David Rosenfeld 2021-02-04 20:58:30 UTC
With this extra-var-file validation passes:
more /tmp/check-cpu.json
{
    "minimal_cpu_count": 1
}

openstack tripleo validator run --validation check-cpu --extra-vars-file /tmp/check-cpu.json
Running Validations without Overcloud settings.
+--------------------------------------+-------------+--------+------------+-------------------------------------+-------------------+-------------+
|                 UUID                 | Validations | Status | Host_Group |            Status_by_Host           | Unreachable_Hosts |   Duration  |
+--------------------------------------+-------------+--------+------------+-------------------------------------+-------------------+-------------+
| 87caf663-5adb-48ab-b23d-600475af0435 |  check-cpu  | PASSED |    all     | compute-0, controller-0, undercloud |                   | 0:00:02.798 |
+--------------------------------------+-------------+--------+------------+-------------------------------------+-------------------+-------------+

With this extra-var-file validation fails:
 more /tmp/check-cpu.json
{
    "minimal_cpu_count": 120
}

openstack tripleo validator run --validation check-cpu --extra-vars-file /tmp/check-cpu.json
Running Validations without Overcloud settings.
+--------------------------------------+-------------+--------+------------+-------------------------------------+-------------------+-------------+
|                 UUID                 | Validations | Status | Host_Group |            Status_by_Host           | Unreachable_Hosts |   Duration  |
+--------------------------------------+-------------+--------+------------+-------------------------------------+-------------------+-------------+
| 40b14321-9b7d-470b-b479-230b9a8b281c |  check-cpu  | FAILED |    all     | compute-0, controller-0, undercloud |                   | 0:00:02.802 |
+--------------------------------------+-------------+--------+------------+-------------------------------------+-------------------+-------------+

extra-var-file is being used because validation passes when one cpu is required and fails when 120 cpus are required.

Comment 16 errata-xmlrpc 2021-03-17 15:33:11 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 16.1.4 director bug fix 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-2021:0817

Comment 17 errata-xmlrpc 2021-03-17 15:38:00 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 16.1.4 director bug fix 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-2021:0817


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