Hi, context: we trying to add validation to the update process, but the validation command doesn't fail even if the the test fails: undercloud-0 tripleo-validations]$ openstack --os-cloud undercloud tripleo validator run --stack undercloud --group pre-system-upgrade [WARNING]: Found both group and host with same name: undercloud Tuesday 09 February 2021 13:59:25 +0000 (0:00:00.063) 0:00:00.063 ****** Tuesday 09 February 2021 13:59:26 +0000 (0:00:00.771) 0:00:00.834 ****** Tuesday 09 February 2021 13:59:26 +0000 (0:00:00.112) 0:00:00.947 ****** Tuesday 09 February 2021 13:59:30 +0000 (0:00:03.507) 0:00:04.454 ****** Tuesday 09 February 2021 13:59:30 +0000 (0:00:00.062) 0:00:04.516 ****** Tuesday 09 February 2021 13:59:30 +0000 (0:00:00.118) 0:00:04.635 ****** Tuesday 09 February 2021 13:59:30 +0000 (0:00:00.110) 0:00:04.746 ****** Tuesday 09 February 2021 13:59:30 +0000 (0:00:00.169) 0:00:04.915 ****** Tuesday 09 February 2021 13:59:30 +0000 (0:00:00.111) 0:00:05.027 ****** =============================================================================== package_version : Get repositories packages versions -------------------- 3.51s package_version : Ensure we get needed facts ---------------------------- 0.77s package_version : Do the comparison ------------------------------------- 0.17s package_version : Compare versions -------------------------------------- 0.12s package_version : Gather variables for each operating system ------------ 0.11s package_version : Fail if we lack a version for any package ------------- 0.11s package_version : Get wanted package ------------------------------------ 0.11s package_version : Initialiaze ok_versions ------------------------------- 0.06s +--------------------------------------+-----------------+--------+------------+----------------+-------------------+-------------+ | UUID | Validations | Status | Host_Group | Status_by_Host | Unreachable_Hosts | Duration | +--------------------------------------+-----------------+--------+------------+----------------+-------------------+-------------+ | dc8ee383-7653-43c1-abee-eaeabe3ec37b | package-version | FAILED | all | undercloud | | 0:00:04.977 | +--------------------------------------+-----------------+--------+------------+----------------+-------------------+-------------+ echo $? 0 The question is then what is the proper way to detect that a validation failed ?
Return code is now seen: openstack tripleo validator run --validation overcloud-service-status Running Validations without Overcloud settings. +--------------------------------------+--------------------------+--------+------------+----------------+-------------------+-------------+ | UUID | Validations | Status | Host_Group | Status_by_Host | Unreachable_Hosts | Duration | +--------------------------------------+--------------------------+--------+------------+----------------+-------------------+-------------+ | 976ad362-07bd-4b2d-9219-a4177b00e32e | overcloud-service-status | FAILED | Undercloud | undercloud | | 0:00:32.542 | +--------------------------------------+--------------------------+--------+------------+----------------+-------------------+-------------+ One or more validations have failed. (undercloud) [stack@undercloud-0 ~]$ echo $? 1 (undercloud) [stack@undercloud-0 ~]$
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.6 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:2097