Correct overcloud delete fail condition

Currently, We are looking for string "overcloud" in
`tripleo_overcloud_status_output` to confirm if overcloud is deleted
or not.

Even when overcloud is present, we get "overcloud" in output and
hence we can miss some conditions where overcloud is not
deleted successfully.

~~~
$ openstack overcloud status
+------------+-------------------+
| Stack Name | Deployment Status |
+------------+-------------------+
| overcloud  |   DEPLOY_SUCCESS  |
+------------+-------------------+
~~~

If overcloud is not available, We get:-

~~~
$ openstack overcloud status
No deployment was found for overcloud
~~~

"No deployment was found" string will be better filter to catch
if overcloud is deleted or not.

Change-Id: I41283afbcd81226b9322696d6d5265077684e2be
This commit is contained in:
Sandeep Yadav 2021-09-21 16:21:27 +05:30
parent 445d4d5d3f
commit ed7cf324d9

View File

@ -42,8 +42,8 @@
debug:
var: tripleo_overcloud_status_output
- name: "Fail if overcloud status command does not contains overcloud"
- name: "Fail if overcloud is not deleted successfully"
when:
- tripleo_overcloud_status_output.find("overcloud") == -1
- tripleo_overcloud_status_output.find("No deployment was found") == -1
fail:
msg: "Overcloud is not deleted"