Force re-run of pacemaker bundle init containers during upgrade-scaleup

We need to recreate the *_init_bundle containers during the staged
upgrade (upgrade-scaleup), because the init containers will e.g. set
the correct replica count for the bundle as we're scaling up from 1 to
3 controllers.

The init containers wouldn't get re-run/recreated automatically on
upgrade-scaleup because none of their input would change. The
DeploymentIdentifier is set by the `openstack upgrade prepare` command
and applied during upgrade with `--limit controller-0`. Then later
when we run `--limit controller-0,controller-1`, the
DeploymentIdentifier value does not change from the perspective of
controller-0, so we have to explicitly remove the bundle init
containers to force re-running them.

Change-Id: I93c6d7292f37529735e24286f4076634aa4fe6a5
Partial-Bug: #1831690
This commit is contained in:
Jiri Stransky 2019-08-13 13:59:44 +02:00
parent e26009fa9c
commit d4db2fa532
6 changed files with 36 additions and 0 deletions

View File

@ -528,6 +528,12 @@ outputs:
mysql_node_names_upgraded is not defined or
mysql_node_names_upgraded | length == 0
- name: remove mysql init container on upgrade-scaleup to force re-init
shell: |
if podman inspect mysql_init_bundle &> /dev/null; then
podman rm mysql_init_bundle
fi
when: mysql_short_node_names_upgraded | length > 1
- name: add the mysql short name to hiera data for the upgrade.
include_role:
name: tripleo-upgrade-hiera

View File

@ -452,6 +452,12 @@ outputs:
redis_short_node_names_upgraded is not defined or
redis_short_node_names_upgraded | length == 0
- name: remove redis init container on upgrade-scaleup to force re-init
shell: |
if podman inspect redis_init_bundle &> /dev/null; then
podman rm redis_init_bundle
fi
when: redis_short_node_names_upgraded | length > 1
- name: add the redis short name to hiera data for the upgrade.
include_role:
name: tripleo-upgrade-hiera

View File

@ -551,6 +551,12 @@ outputs:
haproxy_short_node_names_upgraded is not defined or
haproxy_short_node_names_upgraded | length == 0
- name: remove haproxy init container on upgrade-scaleup to force re-init
shell: |
if podman inspect haproxy_init_bundle &> /dev/null; then
podman rm haproxy_init_bundle
fi
when: haproxy_short_node_names_upgraded | length > 1
- name: add the haproxy short name to hiera data for the upgrade.
include_role:
name: tripleo-upgrade-hiera

View File

@ -421,6 +421,12 @@ outputs:
oslo_messaging_notify_node_names_upgraded is not defined or
oslo_messaging_notify_node_names_upgraded | length == 0
- name: remove rabbitmq init container on upgrade-scaleup to force re-init
shell: |
if podman inspect rabbitmq_init_bundle &> /dev/null; then
podman rm rabbitmq_init_bundle
fi
when: oslo_messaging_notify_short_node_names_upgraded | length > 1
- name: add the oslo_messaging_notify short name to hiera data for the upgrade.
include_role:
name: tripleo-upgrade-hiera

View File

@ -418,6 +418,12 @@ outputs:
rabbitmq_short_node_names_upgraded is not defined or
rabbitmq_short_node_names_upgraded | length == 0
- name: remove rabbitmq init container on upgrade-scaleup to force re-init
shell: |
if podman inspect rabbitmq_init_bundle &> /dev/null; then
podman rm rabbitmq_init_bundle
fi
when: rabbitmq_short_node_names_upgraded | length > 1
- name: add the rabbitmq short name to hiera data for the upgrade.
include_role:
name: tripleo-upgrade-hiera

View File

@ -421,6 +421,12 @@ outputs:
oslo_messaging_rpc_node_names_upgraded is not defined or
oslo_messaging_rpc_node_names_upgraded | length == 0
- name: remove rabbitmq init container on upgrade-scaleup to force re-init
shell: |
if podman inspect rabbitmq_init_bundle &> /dev/null; then
podman rm rabbitmq_init_bundle
fi
when: oslo_messaging_rpc_short_node_names_upgraded | length > 1
- name: add the oslo_messaging_rpc short name to hiera data for the upgrade.
include_role:
name: tripleo-upgrade-hiera