From 4378a1fc214ac026e4abcd5d61faaa3be6bef09a Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Fri, 18 Sep 2020 12:11:09 -0600 Subject: [PATCH] Don't use rescue to skip cell actions We shouldn't use rescue as a path to skip the nova actions in the case of novaless undercloud because it 1) it prints a misleading giant red FATAL and 2) would not stop if there are problems with the cell tasks. Change-Id: I40d7113f2a141f9e672a54850c6cc3d782655af1 (cherry picked from commit b0377e3d15c48369eed5867eec600932d9ddb8b8) --- .../playbooks/cli-overcloud-node-provide.yaml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/tripleo_ansible/playbooks/cli-overcloud-node-provide.yaml b/tripleo_ansible/playbooks/cli-overcloud-node-provide.yaml index ed4b8e6c0..7b894717e 100644 --- a/tripleo_ansible/playbooks/cli-overcloud-node-provide.yaml +++ b/tripleo_ansible/playbooks/cli-overcloud-node-provide.yaml @@ -53,14 +53,14 @@ timeout: 1200 wait_for_bridge_mappings: true - - name: Nova cell host discovery - block: - - name: Detect nova service endpoint - command: >- - openstack --os-cloud undercloud catalog show nova - register: nova_catalog_show - failed_when: "'service nova not found' in nova_catalog_show.stderr" + - name: Detect nova service endpoint + command: >- + openstack --os-cloud undercloud catalog show nova + register: nova_catalog_show + - name: Nova cell host discovery + when: "'service nova not found' not in nova_catalog_show.stderr" + block: # Run cellv2 discovery of hosts - name: Run cell_v2 host discovery command: podman exec nova_api /bin/nova-manage cell_v2 discover_hosts --verbose @@ -76,9 +76,6 @@ until: hypervisor_check is success delay: 30 retries: 30 - rescue: - - debug: - msg: 'Nova endpoint not found, skipping cell host discovery' # Power off nodes the nodes - name: Power off nodes