Run control plane update first, next compute and cephstorage last

Make sure compute role nodes are updated after the entire control
plane has been updated even in composable role and cephstorage role
nodes are updated last.

In composable deployment the control plane is sliced up in controller,
database, messaging. Currently we only ensure that controller get
updated first, so messaging or networker for instance get updated after
compute.

This kind of disruption in the control plane can lead to unexpected
issue on the compute role. Furthermore they can be seen as false
positive as the compute role would be updated after the all the
Controller roles.

Change-Id: Ib3bf87510763edc86f2300e3b28708f6ef38ea18
This commit is contained in:
Sofer Athlan-Guyot 2021-05-17 17:46:55 +02:00 committed by mciecier
parent 32e3a9d3f6
commit 265588950a

View File

@ -23,9 +23,18 @@
oc_roles: "{{ oc_roles + inventory_roles }}"
controller_role_name: "{{ inventory_roles | map('regex_search', '^[A-Za-z0-9]*[Cc]ontroller[A-Za-z0-9]*$') | select('string') | list | last | default('') }}"
- name: register compute role name
set_fact:
compute_role_name: "{{ inventory_roles | map('regex_search', '^[A-Za-z0-9]*[Cc]ompute[A-Za-z0-9]*$') | select('string') | list | last | default('') }}"
- name: register ceph storage role name
set_fact:
cephstorage_role_name: "{{ inventory_roles | map('regex_search', '^[A-Za-z0-9]*[Cc]eph[Ss]torage[A-Za-z0-9]*$') | select('string') | list | last | default('') }}"
- name: store sorted roles with controller first(default)
set_fact:
oc_roles: "{{ oc_roles|intersect([controller_role_name]) + oc_roles|difference([controller_role_name]) }}"
oc_roles: "{{ oc_roles|intersect([controller_role_name]) + oc_roles|difference([controller_role_name]+[compute_role_name]+[cephstorage_role_name]) \
+ oc_roles|intersect([compute_role_name]) + oc_roles|intersect([cephstorage_role_name]) }}"
when: roles_upgrade_order == '__undefined__'
- name: store sorted roles with controller first(user-defined)