From 659352203c91dbbff2f1024776456b681cc453ce Mon Sep 17 00:00:00 2001 From: David Vallee Delisle Date: Tue, 8 Jun 2021 20:56:17 -0400 Subject: [PATCH] nova-compute: Adding failed_when to nova-compute stop task When deleting a partially deployed node, the deletion fails as well because the nova_compute service isn't provisioned. At this point, we don't care much if the service should be present or not, we don't want an additonnal failure. Change-Id: Id3356cdac42d84282014e2e22163bc0ffd825df5 (cherry picked from commit ed320d8a7d8d244fc5aa4a2147170f534e669836) (cherry picked from commit 5904179fe206efd9618e7e185144725a8c81e524) --- deployment/nova/nova-compute-container-puppet.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deployment/nova/nova-compute-container-puppet.yaml b/deployment/nova/nova-compute-container-puppet.yaml index d71ce2793c..23f3a876b7 100644 --- a/deployment/nova/nova-compute-container-puppet.yaml +++ b/deployment/nova/nova-compute-container-puppet.yaml @@ -1375,6 +1375,10 @@ outputs: state: stopped enabled: no become: true + register: stop_nova_compute + failed_when: "('msg' in stop_nova_compute and + 'Could not find the requested service tripleo_nova_compute' not in stop_nova_compute.msg) or + ('rc' in stop_nova_compute and stop_nova_compute.rc != 0)" - name: Delete nova-compute service command: openstack compute service delete {{ nova_compute_service[0].ID }} delegate_to: localhost