diff options
author | 2015-11-13 11:18:50 +0000 | |
---|---|---|
committer | 2015-12-14 14:24:13 +0100 | |
commit | ea1294fe9b11029edab719e8bf558733226b3fd4 (patch) | |
tree | ad104cd5ccf8e14ae8f3be445a87c9d46d4aa8d4 /extraconfig/tasks/pre_puppet_pacemaker.yaml | |
parent | 5a6907f2b829f34daa5f2d9d9cd69de35a1b9c56 (diff) |
Pacemaker maintenance mode for the duration of Puppet run on update
This enables pacemaker maintenantce mode when running Puppet on stack
update. Puppet can try to restart some overcloud services, which
pacemaker tries to prevent, and this can result in a failed Puppet run.
At the end of the puppet run, certain pacemaker resources are restarted
in an additional SoftwareDeployment to make sure that any config changes
have been fully applied. This is only done on stack updates (when
UpdateIdentifier is set to something), because the assumption is that on
stack create services already come up with the correct config.
(Change I9556085424fa3008d7f596578b58e7c33a336f75 has been squashed into
this one.)
Change-Id: I4d40358c511fc1f95b78a859e943082aaea17899
Co-Authored-By: Jiri Stransky <jistr@redhat.com>
Co-Authored-By: James Slagle <jslagle@redhat.com>
Diffstat (limited to 'extraconfig/tasks/pre_puppet_pacemaker.yaml')
-rw-r--r-- | extraconfig/tasks/pre_puppet_pacemaker.yaml | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/extraconfig/tasks/pre_puppet_pacemaker.yaml b/extraconfig/tasks/pre_puppet_pacemaker.yaml new file mode 100644 index 00000000..2cfe92a7 --- /dev/null +++ b/extraconfig/tasks/pre_puppet_pacemaker.yaml @@ -0,0 +1,30 @@ +heat_template_version: 2014-10-16 +description: 'Pre-Puppet Config for Pacemaker deployments' + +parameters: + servers: + type: json + input_values: + type: json + description: input values for the software deployments + +resources: + + ControllerPrePuppetMaintenanceModeConfig: + type: OS::Heat::SoftwareConfig + properties: + group: script + config: | + #!/bin/bash + pacemaker_status=$(systemctl is-active pacemaker) + + if [ "$pacemaker_status" = "active" ]; then + pcs property set maintenance-mode=true + fi + + ControllerPrePuppetMaintenanceModeDeployment: + type: OS::Heat::SoftwareDeployments + properties: + servers: {get_param: servers} + config: {get_resource: ControllerPrePuppetMaintenanceModeConfig} + input_values: {get_param: input_values} |