Bug 1887444 - Running "openstack tripleo validator" without any overcloud leads to an inventory error and crash
Summary: Running "openstack tripleo validator" without any overcloud leads to an inven...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-validations
Version: 16.1 (Train)
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: z8
: 16.1 (Train on RHEL 8.2)
Assignee: mathieu bultel
QA Contact: nlevinki
URL:
Whiteboard:
: 1897117 1987318 (view as bug list)
Depends On:
Blocks: 1989743 1989744
TreeView+ depends on / blocked
 
Reported: 2020-10-12 13:45 UTC by Cédric Jeanneret
Modified: 2024-10-01 16:58 UTC (History)
14 users (show)

Fixed In Version: openstack-tripleo-validations-11.3.2-1.20210803213306.4db92ba.el8ost openstack-tripleo-common-11.4.1-1.20210409103438.75bd92a.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1989743 1989744 (view as bug list)
Environment:
Last Closed: 2022-02-17 11:41:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 764955 0 None MERGED Generate inventory without any overcloud 2021-02-15 12:34:14 UTC
OpenStack gerrit 765524 0 None MERGED Cleanup and add test coverage for inventory without overcloud 2021-04-12 05:12:06 UTC
OpenStack gerrit 766721 0 None MERGED Cleanup and add test coverage for inventory without overcloud 2021-04-12 05:12:06 UTC
OpenStack gerrit 766722 0 None MERGED Cleanup and add test coverage for inventory without overcloud 2021-04-12 05:12:06 UTC
OpenStack gerrit 766727 0 None MERGED Cleanup and add test coverage for inventory without overcloud 2021-04-12 05:12:06 UTC
OpenStack gerrit 772468 0 None MERGED Generate inventory without any overcloud 2021-02-15 12:34:14 UTC
OpenStack gerrit 772469 0 None MERGED Generate inventory without any overcloud 2021-02-15 12:34:14 UTC
OpenStack gerrit 772470 0 None MERGED Generate inventory without any overcloud 2021-02-15 12:34:14 UTC
OpenStack gerrit 802885 0 None MERGED Fix Inventory Generation without Overcloud deployed 2022-02-16 13:50:13 UTC
OpenStack gerrit 802886 0 None MERGED Fix Inventory Generation without Overcloud deployed 2022-02-16 13:50:14 UTC
OpenStack gerrit 802887 0 None MERGED Fix Inventory Generation without Overcloud deployed 2022-02-16 13:50:15 UTC
OpenStack gerrit 802888 0 None MERGED Fix Inventory Generation without Overcloud deployed 2022-02-16 13:50:15 UTC
OpenStack gerrit 802892 0 None MERGED Fix Inventory Generation without Overcloud deployed 2022-02-16 13:50:16 UTC
Red Hat Issue Tracker OSP-1959 0 None None None 2021-11-18 14:30:22 UTC
Red Hat Issue Tracker VALFRWK-371 0 None None None 2021-11-18 14:30:46 UTC

Internal Links: 2056602

Description Cédric Jeanneret 2020-10-12 13:45:27 UTC
Description of problem:
If a validator is executed before overcloud is created there is an error about tripleo-ansible-inventory.yaml not being parse-able:

undercloud) [stack@undercloud-0 ~]$ openstack tripleo validator run --group pre-introspection
[WARNING]:  * Failed to parse /home/stack/tripleo-ansible-inventory.yaml with
auto plugin: no root 'plugin' key found, '/home/stack/tripleo-ansible-
inventory.yaml' is not a valid YAML inventory plugin config file
[WARNING]:  * Failed to parse /home/stack/tripleo-ansible-inventory.yaml with
yaml plugin: can't add group to itself
[WARNING]:  * Failed to parse /home/stack/tripleo-ansible-inventory.yaml with
ini plugin: Invalid host pattern 'Undercloud:' supplied, ending in ':' is not
allowed, this character is reserved to provide a port.
[WARNING]: Unable to parse /home/stack/tripleo-ansible-inventory.yaml as an
inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that
the implicit localhost does not match 'all'
/usr/lib/python3.6/site-packages/validations_libs/ansible.py:374: ResourceWarning: unclosed file <_io.BufferedWriter name='/var/log/validations/artifacts/85241718-e8e4-42b7-963a-4cde3c6a0179_check-cpu.yaml_2020-10-10T23:50:39.592042Z/artifacts/stdout'>
  status, rc = runner.run()

Version-Release number of selected component (if applicable):
python3-tripleoclient-12.3.2-1.20200914164928.el8ost.noarch

How reproducible:
Always

Steps to Reproduce:
1. Run validator without an overcloud
2.
3.

Actual results:
We see issues with parsing the inventory, and many validations fail

Expected results:
It should gracefully fail without a stacktrace.

Additional info:

Comment 2 Gaël Chamoulaud 2020-11-19 10:10:13 UTC
*** Bug 1897117 has been marked as a duplicate of this bug. ***

Comment 3 Cédric Jeanneret 2021-02-10 10:21:10 UTC
Upstream merged all the way - need to cherry-pick in 16.1-trunk for z5 integration!

Comment 16 Jad Haj Yahya 2021-07-29 05:44:52 UTC
Created inventory file using:
tripleo-ansible-inventory --ansible_ssh_user heat-admin --static-yaml-inventory inventory.yaml

then ran a validation:
openstack tripleo validator run --validation check-cpu --extra-vars minimal_cpu_count=10 --static-inventory inventory.yaml

Comment 17 Jad Haj Yahya 2021-07-29 13:10:02 UTC
Moving back to On_QA as verification was done mistakenly on 16.2 
Also I should not have generate the inventory file myselfm should be done automatically

Comment 18 David Rosenfeld 2021-07-29 14:25:32 UTC
Seeing out of range error when a validation is executed before overcloud is deployed:

openstack tripleo validator run --validation check-ram
Running Validations without Overcloud settings.
Error creating static inventory: list index out of range
Failed to generate inventory

Comment 19 Gaël Chamoulaud 2021-07-29 14:39:30 UTC
*** Bug 1987318 has been marked as a duplicate of this bug. ***

Comment 21 Gaël Chamoulaud 2021-08-04 12:21:13 UTC
new build in FIV is openstack-tripleo-validations-11.3.2-1.20210803213306.4db92ba.el8ost

The one for openstack-tripleo-common is still accurate! No change here.

Comment 22 Lon Hohberger 2021-12-22 16:17:45 UTC
According to our records, this should be resolved by openstack-tripleo-common-11.4.1-1.20210719133310.el8ost.  This build is available now.

Comment 23 Jiri Podivin 2022-02-17 07:12:03 UTC
Manually verified on 17.02.2022 with RHOS 16.1.8, puddle RHOS-16.1-RHEL-8-20220210.n.1.


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