Bug 1888642

Summary: [Validator Run] Ensure that the plan given as parameter are known plan before running validations
Product: Red Hat OpenStack Reporter: Gaël Chamoulaud <gchamoul>
Component: python-tripleoclientAssignee: Gaël Chamoulaud <gchamoul>
Status: CLOSED ERRATA QA Contact: David Rosenfeld <drosenfe>
Severity: medium Docs Contact:
Priority: medium    
Version: 16.1 (Train)CC: cjeanner, hbrock, jbuchta, jschluet, jslagle, mbultel, mburns, spower
Target Milestone: z4Keywords: Triaged
Target Release: 16.1 (Train on RHEL 8.2)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-tripleoclient-12.3.2-1.20200914164931.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-03-17 15:33:11 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:
Embargoed:
Bug Depends On: 1912879    
Bug Blocks:    

Description Gaël Chamoulaud 2020-10-15 12:26:06 UTC
The validator run CLI should enforce the --plan/--stack parameter to be sure the given value is a known plan by tripleo.

If not the CLI should raise an exception and inform the user that he/she used a wrong plan!

Comment 7 David Rosenfeld 2021-02-02 19:43:07 UTC
Specifying a valid plan is successful:

openstack tripleo validator run --plan overcloud --validation ceph-health
+--------------------------------------+-------------+--------+------------+----------------+-------------------+----------+
|                 UUID                 | Validations | Status | Host_Group | Status_by_Host | Unreachable_Hosts | Duration |
+--------------------------------------+-------------+--------+------------+----------------+-------------------+----------+
| 0a5def22-5731-46d0-baf1-7e9b9f9f2a9f | ceph-health | PASSED |  ceph_mon  |                |                   |          |
+--------------------------------------+-------------+--------+------------+----------------+-------------------+----------+

Specifying a non-existent plan gives this warning:

(undercloud) [stack@undercloud-0 ~]$ openstack tripleo validator run --plan test --validation ceph-health
The plan and the stack 'test' doesn't exist OR are in 'failed' or 'deploying' state. Please use a valid plan

Comment 13 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 14 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