aboutsummaryrefslogtreecommitdiffstats
path: root/manifests/profile/pacemaker/rabbitmq.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/profile/pacemaker/rabbitmq.pp')
-rw-r--r--manifests/profile/pacemaker/rabbitmq.pp17
1 files changed, 11 insertions, 6 deletions
diff --git a/manifests/profile/pacemaker/rabbitmq.pp b/manifests/profile/pacemaker/rabbitmq.pp
index efb91b5..1f25e8b 100644
--- a/manifests/profile/pacemaker/rabbitmq.pp
+++ b/manifests/profile/pacemaker/rabbitmq.pp
@@ -22,21 +22,20 @@
# (Optional) The hostname of the node responsible for bootstrapping tasks
# Defaults to hiera('bootstrap_nodeid')
#
+# [*erlang_cookie*]
+# (Optional) Content of erlang cookie.
+# Defaults to hiera('rabbitmq::erlang_cookie').
+#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
#
-# [*erlang_cookie*]
-# (Optional) Content of erlang cookie.
-# Defaults to hiera('rabbitmq::erlang_cookie').
-#
class tripleo::profile::pacemaker::rabbitmq (
$bootstrap_node = hiera('bootstrap_nodeid'),
- $step = hiera('step'),
$erlang_cookie = hiera('rabbitmq::erlang_cookie'),
+ $step = hiera('step'),
) {
-
if $::hostname == downcase($bootstrap_node) {
$pacemaker_master = true
} else {
@@ -55,6 +54,12 @@ class tripleo::profile::pacemaker::rabbitmq (
require => Class['::rabbitmq'],
}
+ if $step >= 1 and $pacemaker_master and hiera('stack_action') == 'UPDATE' {
+ tripleo::pacemaker::resource_restart_flag { 'rabbitmq-clone':
+ subscribe => Class['rabbitmq::service'],
+ }
+ }
+
if $step >= 2 and $pacemaker_master {
pacemaker::resource::ocf { 'rabbitmq':
ocf_agent_name => 'heartbeat:rabbitmq-cluster',