DCN Multistack support for FFU

The DCN topology consists of multiple stacks which may not
include controller nodes (only compute/ceph nodes). Each such
stack is upgraded separately and no controllers are valid result.
Let's not fail If there are no controllers and move on with no
controllers.

Change-Id: Iaf08bc5aee4b97ab630e37ac7c49fdf6c316d8ea
This commit is contained in:
Marian Krcmarik 2023-10-03 17:33:16 +02:00
parent 3fc2fcf5b7
commit fb6d9ef98d
2 changed files with 7 additions and 4 deletions

View File

@ -2,4 +2,4 @@
- include_tasks: controller_post_script.yml
loop_control:
loop_var: node_name
loop: "{{ inventory_hostmap[controller_role_name] }}"
loop: "{{ inventory_hostmap[controller_role_name] | default([]) }}"

View File

@ -1,13 +1,16 @@
---
- set_fact:
pcs_host: ""
- set_fact:
boostrap_node: "{{ ((oc_roles_hosts|dict2items |
selectattr('key', 'in', inventory_rolemap['mysql'] | default([]))) |
map(attribute='value') | map('sort') | list | flatten(1))[0] | default('') }}"
- name: Create /var/lib/tripleo/transfer-flags/var-lib-mysql in bootstrap node
become: true
become_user: "{{ (overcloud_ssh_user) | ternary(overcloud_ssh_user, 'heat-admin') }}"
delegate_to: "{{ ((oc_roles_hosts|dict2items |
selectattr('key', 'in', inventory_rolemap['mysql'] | default([]))) |
map(attribute='value') | map('sort') | list | flatten(1))[0] }}"
delegate_to: "{{ boostrap_node }}"
shell: "sudo mkdir -p /var/lib/tripleo/transfer-flags && sudo touch /var/lib/tripleo/transfer-flags/var-lib-mysql"
when: boostrap_node|bool
- name: upgrade the whole overcloud
vars: