Files
devstack/roles/orchestrate-devstack/tasks/main.yaml
Yatin Karel 581d0a1d60 [subnode setup] Fail the playbook when any node setup fails
Currently on the multinode jobs, job continue to run even
if devstack setup fails on any of the subnode and then fails later
when required conditions are not met.
This patch changes it to fail if any of the node setup fails using
any_errors_fatal: true.

Change-Id: I2acd8a1fe0802ee1880df2ef794f8e7d7478b67b
Signed-off-by: Yatin Karel <ykarel@redhat.com>
2025-09-29 17:06:34 +05:30

51 lines
1.6 KiB
YAML

- name: Run devstack on the controller
include_role:
name: run-devstack
when: inventory_hostname == 'controller'
- name: Setup devstack on sub-nodes
any_errors_fatal: true
block:
- name: Distribute the build sshkey for the user "stack"
include_role:
name: copy-build-sshkey
vars:
copy_sshkey_target_user: 'stack'
- name: Sync CA data to subnodes (when any)
# Only do this if the tls-proxy service is defined and enabled
include_role:
name: sync-devstack-data
when: devstack_services['tls-proxy']|default(false)
- name: Sync controller ceph.conf and key rings to subnode
include_role:
name: sync-controller-ceph-conf-and-keys
when: devstack_plugins is defined and 'devstack-plugin-ceph' in devstack_plugins
- name: Run devstack on the sub-nodes
include_role:
name: run-devstack
when: inventory_hostname in groups['subnode']
- name: Discover hosts
# Discovers compute nodes (subnodes) and maps them to cells. Only run
# on the controller node.
# NOTE(mriedem): We want to remove this if/when nova supports
# auto-registration of computes with cells, but that's not happening in
# Ocata.
# NOTE(andreaf) This is taken (NOTE included) from the discover_hosts
# function in devstack gate. Since this is now in devstack, which is
# branched, we know that the discover_hosts tool exists.
become: true
become_user: stack
shell: ./tools/discover_hosts.sh
args:
chdir: "{{ devstack_base_dir }}/devstack"
when: inventory_hostname == 'controller'
when:
- '"controller" in hostvars'
- '"subnode" in groups'