tripleo-heat-templates/deployment/manila
Damien Ciabrini 3230f005c1 HA: reorder init_bundle and restart_bundle for improved updates
A pacemaker bundle can be restarted either because:
  . a tripleo config has been updated (from /var/lib/config-data)
  . the bundle config has been updated (container image, bundle
    parameter,...)

In HA services, special container "*_restart_bundle" is in charge
of restarting the HA service on tripleo config change. Special
container "*_init_bundle" handles restart on bundle config change.

When both types of change occur at the same time, the bundle must
be restarted first, so that the container has a chance to be
recreated with all bind-mounts updated before it tries to reload
the updated config.

Implement the improvement with two changes:

1. Make the "*_restart_bundle" start after the "*_init_bundle", and
make sure "*_restart_bundle" is only enabled after the initial
deployment.

2. During minor update, make sure that the "*_restart_bundle" not
only restarts the container, but also waits until the service
is operational (e.g. galera fully promoted to Master). This forces
the rolling restart to happen sequentially, and avoid service
disruption in quorum-based clustered services like galera and
rabbitmq.

Tested the following update use cases:

* minor update: ensure that *_restart_bundle restarts all types of
  resources (OCF, bundles, A/P, A/P Master/Slave).

* minor update: ensure *_restart_bundle is not executed when no
  config or image update happened for a service.

* restart_bundle: when resource (OCF or container) fails to
  restart, bail out early instead of waiting for nothing until
  timeout is reached.

* restart_bundle: make sure a resource is restarted even when it
  is in failed stated when *_restart_bundle is called.

* restart_bundle: A/P can be restarted on any node, so watch
  restart globally. When the resource restarts as Slave, continue
  watching for a Master elsewhere in the cluster.

* restart_bundle: if an A/P is not running locally, make sure it
  doesn't get restarted anywhere else in the cluster.

* restart_bundle: do not try to restart stopped (disabled) or
  unmanaged resource. Bail out early instead, to not wait until
  timeout is reached.

* stack update: make sure that running a stack update with no
  change does not trigger any *_restart_bundle, and does not
  restart any HA container either.

* stack update: when bundle and config will change, ensure bundle
  is updated before HA containers are restarted (e.g. HAProxy
  migration to TLS everywhere)

Change-Id: Ic41d4597e9033f9d7847bb6c10c25f443fbd5b0e
Closes-Bug: #1839858
2020-01-23 16:09:36 +01:00
..
manila-api-container-puppet.yaml Manage all Keystone resources with Ansible 2020-01-06 22:33:05 +00:00
manila-backend-cephfs.yaml Transport ManilaCephFSDataPoolName to Manila CephFS template 2019-07-30 10:55:55 +00:00
manila-backend-isilon.yaml Move Manila backends into deployment 2019-04-22 08:44:39 -04:00
manila-backend-netapp.yaml Move Manila backends into deployment 2019-04-22 08:44:39 -04:00
manila-backend-unity.yaml Move Manila backends into deployment 2019-04-22 08:44:39 -04:00
manila-backend-vmax.yaml Move Manila backends into deployment 2019-04-22 08:44:39 -04:00
manila-backend-vnx.yaml Move Manila backends into deployment 2019-04-22 08:44:39 -04:00
manila-base.yaml Fix debug hiera keys 2019-11-07 08:39:37 -07:00
manila-scheduler-container-puppet.yaml Remove unnecessary slash volume maps 2019-12-04 20:32:14 +02:00
manila-share-common.yaml Remove unnecessary slash volume maps 2019-12-04 20:32:14 +02:00
manila-share-container-puppet.yaml Get rid of docker removing in post_upgrade tasks. 2019-11-12 16:33:38 +01:00
manila-share-pacemaker-puppet.yaml HA: reorder init_bundle and restart_bundle for improved updates 2020-01-23 16:09:36 +01:00