Do not restart bundles during a minor update
It makes no sense since we are going to stop the cluster on the node anyway. With change Ib3562adbd83f7162c2aeb450329b7cc4ab200fc2 we inject the TRIPLEO_MINOR_UDPATE variable into the update playbooks and we also push it (by default to false) inside the paunch start container step. By exporting the variable TRIPLEO_MINOR_UPDATE without a value we tell docker (and podman) to inherit this value from the host. When the env variable is set to true we avoid calling pcs inside the containers to restart the bundles because at that point we know that restarting the HA container would make no sense. We tested the changes as follows: A) Ran a minor update (openstack overcloud update prepare + openstack overcloud update run --roles Controller) and observed that there were no extra pcmk-managed bundles restarts (i.e. even when paunch decided to invoke the <service>_restart_bundle it was a noop because TRIPLEO_MINOR_UDPATE was 'true') B) We ran a re-deploy without any changes and observed that no restart of pcmk-managed bundles took place C) We ran a re-deploy and forced some configuration changes and observed that TRIPLEO_MINOR_UDPATE was false and that the <service>_restart_bundle was run by paunch and that it restarted the bundle that had the config changed. Co-Authored-By: Damien Ciabrini <dciabrin@redhat.com> Change-Id: Id1d671506d3ec827bc311b47d9363952e1239ce3
This commit is contained in:
parent
c94964e45e
commit
e6ab4856d7
|
@ -185,12 +185,14 @@ outputs:
|
|||
net: host
|
||||
ipc: host
|
||||
user: root
|
||||
environment:
|
||||
- TRIPLEO_MINOR_UPDATE
|
||||
command:
|
||||
- '/usr/bin/bootstrap_host_exec'
|
||||
- 'cinder_backup'
|
||||
- str_replace:
|
||||
template:
|
||||
'if /usr/sbin/pcs resource show openstack-cinder-backup; then /usr/sbin/pcs resource restart --wait=PCMKTIMEOUT openstack-cinder-backup; echo "openstack-cinder-backup restart invoked"; fi'
|
||||
'if [ x"${TRIPLEO_MINOR_UPDATE,,}" != x"true" ] && /usr/sbin/pcs resource show openstack-cinder-backup; then /usr/sbin/pcs resource restart --wait=PCMKTIMEOUT openstack-cinder-backup; echo "openstack-cinder-backup restart invoked"; fi'
|
||||
params:
|
||||
PCMKTIMEOUT: {get_param: PcmkConfigRestartTimeout}
|
||||
image: {get_param: DockerCinderBackupImage}
|
||||
|
|
|
@ -169,12 +169,14 @@ outputs:
|
|||
net: host
|
||||
ipc: host
|
||||
user: root
|
||||
environment:
|
||||
- TRIPLEO_MINOR_UPDATE
|
||||
command:
|
||||
- '/usr/bin/bootstrap_host_exec'
|
||||
- 'cinder_volume'
|
||||
- str_replace:
|
||||
template:
|
||||
'if /usr/sbin/pcs resource show openstack-cinder-volume; then /usr/sbin/pcs resource restart --wait=PCMKTIMEOUT openstack-cinder-volume; echo "openstack-cinder-volume restart invoked"; fi'
|
||||
'if [ x"${TRIPLEO_MINOR_UPDATE,,}" != x"true" ] && /usr/sbin/pcs resource show openstack-cinder-volume; then /usr/sbin/pcs resource restart --wait=PCMKTIMEOUT openstack-cinder-volume; echo "openstack-cinder-volume restart invoked"; fi'
|
||||
params:
|
||||
PCMKTIMEOUT: {get_param: PcmkConfigRestartTimeout}
|
||||
image: {get_param: DockerCinderVolumeImage}
|
||||
|
|
|
@ -268,12 +268,14 @@ outputs:
|
|||
net: host
|
||||
ipc: host
|
||||
user: root
|
||||
environment:
|
||||
- TRIPLEO_MINOR_UPDATE
|
||||
command:
|
||||
- '/usr/bin/bootstrap_host_exec'
|
||||
- 'mysql'
|
||||
- str_replace:
|
||||
template:
|
||||
'if /usr/sbin/pcs resource show galera-bundle; then /usr/sbin/pcs resource restart --wait=PCMKTIMEOUT galera-bundle; echo "galera-bundle restart invoked"; fi'
|
||||
'if [ x"${TRIPLEO_MINOR_UPDATE,,}" != x"true" ] && /usr/sbin/pcs resource show galera-bundle; then /usr/sbin/pcs resource restart --wait=PCMKTIMEOUT galera-bundle; echo "galera-bundle restart invoked"; fi'
|
||||
params:
|
||||
PCMKTIMEOUT: {get_param: PcmkConfigRestartTimeout}
|
||||
image: {get_param: DockerMysqlImage}
|
||||
|
|
|
@ -216,12 +216,14 @@ outputs:
|
|||
net: host
|
||||
ipc: host
|
||||
user: root
|
||||
environment:
|
||||
- TRIPLEO_MINOR_UPDATE
|
||||
command:
|
||||
- '/usr/bin/bootstrap_host_exec'
|
||||
- 'redis'
|
||||
- str_replace:
|
||||
template:
|
||||
'if /usr/sbin/pcs resource show redis-bundle; then /usr/sbin/pcs resource restart --wait=PCMKTIMEOUT redis-bundle; echo "redis-bundle restart invoked"; fi'
|
||||
'if [ x"${TRIPLEO_MINOR_UPDATE,,}" != x"true" ] && /usr/sbin/pcs resource show redis-bundle; then /usr/sbin/pcs resource restart --wait=PCMKTIMEOUT redis-bundle; echo "redis-bundle restart invoked"; fi'
|
||||
params:
|
||||
PCMKTIMEOUT: {get_param: PcmkConfigRestartTimeout}
|
||||
image: {get_param: DockerRedisConfigImage}
|
||||
|
|
|
@ -235,12 +235,14 @@ outputs:
|
|||
ipc: host
|
||||
user: root
|
||||
config_volume: haproxy
|
||||
environment:
|
||||
- TRIPLEO_MINOR_UPDATE
|
||||
command:
|
||||
- '/usr/bin/bootstrap_host_exec'
|
||||
- 'haproxy'
|
||||
- str_replace:
|
||||
template:
|
||||
'if /usr/sbin/pcs resource show haproxy-bundle; then /usr/sbin/pcs resource restart --wait=PCMKTIMEOUT haproxy-bundle; echo "haproxy-bundle restart invoked"; fi'
|
||||
'if [ x"${TRIPLEO_MINOR_UPDATE,,}" != x"true" ] && /usr/sbin/pcs resource show haproxy-bundle; then /usr/sbin/pcs resource restart --wait=PCMKTIMEOUT haproxy-bundle; echo "haproxy-bundle restart invoked"; fi'
|
||||
params:
|
||||
PCMKTIMEOUT: {get_param: PcmkConfigRestartTimeout}
|
||||
image: {get_param: DockerHAProxyImage}
|
||||
|
|
|
@ -150,12 +150,14 @@ outputs:
|
|||
net: host
|
||||
ipc: host
|
||||
user: root
|
||||
environment:
|
||||
- TRIPLEO_MINOR_UPDATE
|
||||
command:
|
||||
- '/usr/bin/bootstrap_host_exec'
|
||||
- 'manila_share'
|
||||
- str_replace:
|
||||
template:
|
||||
'if /usr/sbin/pcs resource show openstack-manila-share; then /usr/sbin/pcs resource restart --wait=PCMKTIMEOUT openstack-manila-share; echo "openstack-manila-share restart invoked"; fi'
|
||||
'if [ x"${TRIPLEO_MINOR_UPDATE,,}" != x"true" ] && /usr/sbin/pcs resource show openstack-manila-share; then /usr/sbin/pcs resource restart --wait=PCMKTIMEOUT openstack-manila-share; echo "openstack-manila-share restart invoked"; fi'
|
||||
params:
|
||||
PCMKTIMEOUT: {get_param: PcmkConfigRestartTimeout}
|
||||
image: {get_param: DockerManilaShareImage}
|
||||
|
|
|
@ -191,12 +191,14 @@ outputs:
|
|||
net: host
|
||||
ipc: host
|
||||
user: root
|
||||
environment:
|
||||
- TRIPLEO_MINOR_UPDATE
|
||||
command:
|
||||
- '/usr/bin/bootstrap_host_exec'
|
||||
- 'oslo_messaging_notify'
|
||||
- str_replace:
|
||||
template:
|
||||
'if /usr/sbin/pcs resource show rabbitmq-bundle; then /usr/sbin/pcs resource restart --wait=PCMKTIMEOUT rabbitmq-bundle; echo "rabbitmq-bundle restart invoked"; fi'
|
||||
'if [ x"${TRIPLEO_MINOR_UPDATE,,}" != x"true" ] && /usr/sbin/pcs resource show rabbitmq-bundle; then /usr/sbin/pcs resource restart --wait=PCMKTIMEOUT rabbitmq-bundle; echo "rabbitmq-bundle restart invoked"; fi'
|
||||
params:
|
||||
PCMKTIMEOUT: {get_param: PcmkConfigRestartTimeout}
|
||||
image: {get_param: DockerRabbitmqImage}
|
||||
|
|
|
@ -191,12 +191,14 @@ outputs:
|
|||
net: host
|
||||
ipc: host
|
||||
user: root
|
||||
environment:
|
||||
- TRIPLEO_MINOR_UPDATE
|
||||
command:
|
||||
- '/usr/bin/bootstrap_host_exec'
|
||||
- 'rabbitmq'
|
||||
- str_replace:
|
||||
template:
|
||||
'if /usr/sbin/pcs resource show rabbitmq-bundle; then /usr/sbin/pcs resource restart --wait=PCMKTIMEOUT rabbitmq-bundle; echo "rabbitmq-bundle restart invoked"; fi'
|
||||
'if [ x"${TRIPLEO_MINOR_UPDATE,,}" != x"true" ] && /usr/sbin/pcs resource show rabbitmq-bundle; then /usr/sbin/pcs resource restart --wait=PCMKTIMEOUT rabbitmq-bundle; echo "rabbitmq-bundle restart invoked"; fi'
|
||||
params:
|
||||
PCMKTIMEOUT: {get_param: PcmkConfigRestartTimeout}
|
||||
image: {get_param: DockerRabbitmqImage}
|
||||
|
|
|
@ -191,12 +191,14 @@ outputs:
|
|||
net: host
|
||||
ipc: host
|
||||
user: root
|
||||
environment:
|
||||
- TRIPLEO_MINOR_UPDATE
|
||||
command:
|
||||
- '/usr/bin/bootstrap_host_exec'
|
||||
- 'oslo_messaging_rpc'
|
||||
- str_replace:
|
||||
template:
|
||||
'if /usr/sbin/pcs resource show rabbitmq-bundle; then /usr/sbin/pcs resource restart --wait=PCMKTIMEOUT rabbitmq-bundle; echo "rabbitmq-bundle restart invoked"; fi'
|
||||
'if [ x"${TRIPLEO_MINOR_UPDATE,,}" != x"true" ] && /usr/sbin/pcs resource show rabbitmq-bundle; then /usr/sbin/pcs resource restart --wait=PCMKTIMEOUT rabbitmq-bundle; echo "rabbitmq-bundle restart invoked"; fi'
|
||||
params:
|
||||
PCMKTIMEOUT: {get_param: PcmkConfigRestartTimeout}
|
||||
image: {get_param: DockerRabbitmqImage}
|
||||
|
|
|
@ -134,12 +134,14 @@ outputs:
|
|||
net: host
|
||||
ipc: host
|
||||
user: root
|
||||
environment:
|
||||
- TRIPLEO_MINOR_UPDATE
|
||||
command:
|
||||
- '/usr/bin/bootstrap_host_exec'
|
||||
- 'ovn_dbs'
|
||||
- str_replace:
|
||||
template:
|
||||
'if /usr/sbin/pcs resource show ovn-dbs-bundle; then /usr/sbin/pcs resource restart --wait=PCMKTIMEOUT ovn-dbs-bundle; echo "ovn-dbs-bundle restart invoked"; fi'
|
||||
'if [ x"${TRIPLEO_MINOR_UPDATE,,}" != x"true" ] && /usr/sbin/pcs resource show ovn-dbs-bundle; then /usr/sbin/pcs resource restart --wait=PCMKTIMEOUT ovn-dbs-bundle; echo "ovn-dbs-bundle restart invoked"; fi'
|
||||
params:
|
||||
PCMKTIMEOUT: {get_param: PcmkConfigRestartTimeout}
|
||||
image: {get_param: DockerOvnDbsConfigImage}
|
||||
|
|
Loading…
Reference in New Issue