Bug 1953552 - Validation run doesn't work when passing a static inventory by its relative path and only by passing an absolute path.
Summary: Validation run doesn't work when passing a static inventory by its relative p...
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: z7
: 16.1 (Train on RHEL 8.2)
Assignee: mathieu bultel
QA Contact: David Rosenfeld
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-26 11:25 UTC by Gaël Chamoulaud
Modified: 2021-12-09 20:19 UTC (History)
3 users (show)

Fixed In Version: python-validations-libs-1.0.5-1.20210429080935.4a660ec.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-12-09 20:19:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 753845 0 None MERGED Handle dynamically the ansible artifacts dir path 2021-04-28 11:33:10 UTC
OpenStack gerrit 775930 0 None MERGED Return absolute path for inventory 2021-04-26 11:25:20 UTC
Red Hat Issue Tracker OSP-3322 0 None None None 2021-11-18 11:36:58 UTC
Red Hat Issue Tracker VALFRWK-488 0 None None None 2021-08-13 05:34:08 UTC
Red Hat Product Errata RHBA-2021:3762 0 None None None 2021-12-09 20:19:20 UTC

Description Gaël Chamoulaud 2021-04-26 11:25:21 UTC
Description of problem:

When passing the relative path to static inventory file when running a validation, the inventory is not taken in consideration. It only work if passing the absolute path. 

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

- python3-validations-libs-1.0.5-1.20210326153612.4a660ec.el8ost.noarch

How reproducible:

(undercloud) [stack@undercloud-0 ~]$ openstack tripleo validator run --validation check-cpu --static-inventory inventory.yaml
Running Validations without Overcloud settings.
+--------------------------------------+-------------+--------+------------+----------------+-------------------+----------+
|                 UUID                 | Validations | Status | Host_Group | Status_by_Host | Unreachable_Hosts | Duration |
+--------------------------------------+-------------+--------+------------+----------------+-------------------+----------+
| 34a71bf3-2429-4344-9198-9258d5679baa |  check-cpu  | PASSED |    all     |                |                   |          |
+--------------------------------------+-------------+--------+------------+----------------+-------------------+----------+

(undercloud) [stack@undercloud-0 ~]$ openstack tripleo validator show run 34a71bf3-2429-4344-9198-9258d5679baa --full
{
    "plays": [
        {
            "play": {
                "duration": {
                    "start": "2021-04-26T11:21:41.016393Z"
                },
                "host": "all",
                "id": "34a71bf3-2429-4344-9198-9258d5679baa",
                "validation_id": "check-cpu",
                "validation_path": "/usr/share/ansible/validation-playbooks"
            },
            "tasks": []
        }
    ],
    "stats": {},
    "validation_output": []
}

(undercloud) [stack@undercloud-0 ~]$ openstack tripleo validator run --validation check-cpu --static-inventory /home/stack/inventory.yaml
Running Validations without Overcloud settings.
+--------------------------------------+-------------+--------+------------+-------------------------------------+-------------------+-------------+
|                 UUID                 | Validations | Status | Host_Group |            Status_by_Host           | Unreachable_Hosts |   Duration  |
+--------------------------------------+-------------+--------+------------+-------------------------------------+-------------------+-------------+
| 080355b9-7bab-4a2d-b275-690943507ee8 |  check-cpu  | FAILED |    all     | compute-0, controller-0, undercloud |                   | 0:00:02.758 |
+--------------------------------------+-------------+--------+------------+-------------------------------------+-------------------+-------------+
One or more validations have failed.


Steps to Reproduce:
1. Generate a static inventory from tripleo-ansible-inventory script
2. Run one validation with --static-inventory inventory.yaml (relative path) 
   - Validation will be considered as PASSED but real executation didn't happen, no duration etc...
3. Run one validation with --static-inventory /home/stack/inventory.yaml (absolute path)

Comment 2 Gaël Chamoulaud 2021-04-27 12:19:37 UTC
The patch has to be backported downstream first due to mishap on the rhos-16.1-trunk-patches.

Comment 12 Jad Haj Yahya 2021-07-28 11:29:43 UTC
Verified according to instruction above

Comment 24 errata-xmlrpc 2021-12-09 20:19: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.7 (Train) bug fix and 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/RHBA-2021:3762


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