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
This commit is contained in:
Alex Schultz 2020-09-18 12:11:09 -06:00
parent d5aaeb3f43
commit b0377e3d15
1 changed files with 7 additions and 10 deletions

View File

@ -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