summaryrefslogtreecommitdiffstats
path: root/puppet/manifests
diff options
context:
space:
mode:
authorJiri Stransky <jistr@redhat.com>2015-06-04 16:20:52 +0200
committerJiri Stransky <jistr@redhat.com>2015-07-01 13:54:00 +0200
commit1787fbc7ca58f9965cd5d64b685c1f9beed4cb9b (patch)
tree3b535f75d170cab13208d8442f8bb2a09ef4cc91 /puppet/manifests
parent5d1738f6e3fcdd73bb3fa1c64df9bb295bb42184 (diff)
Allow to enable fencing, pass through fencing config
Add two new parameters: EnableFencing and FencingConfig. FencingConfig is a json with an expected structure documented in the templates. It gets passed further to puppet-tripleo, which configures the fencing devices. Fencing is configured and enabled in the last step after all pacemaker resources and constraints have been created, which should be a more stable approach than the other way round. Change-Id: Ifd432bfd2443b6d13e7efa006d4120bb0eaa2554 Depends-On: I819fc8c126ec47cd207c59b3dcf92ff699649c5a Depends-On: I8b7adff6f05f864115071c51810b41efad887584
Diffstat (limited to 'puppet/manifests')
-rw-r--r--puppet/manifests/overcloud_controller_pacemaker.pp10
1 files changed, 9 insertions, 1 deletions
diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp
index a57465c0..ea1671a5 100644
--- a/puppet/manifests/overcloud_controller_pacemaker.pp
+++ b/puppet/manifests/overcloud_controller_pacemaker.pp
@@ -37,6 +37,8 @@ if $::hostname == downcase(hiera('bootstrap_nodeid')) {
$sync_db = false
}
+$enable_fencing = str2bool(hiera('enable_fencing', 'false')) and hiera('step') >= 5
+
# When to start and enable services which haven't been Pacemakerized
# FIXME: remove when we start all OpenStack services using Pacemaker
# (occurences of this variable will be gradually replaced with false)
@@ -72,7 +74,13 @@ if hiera('step') >= 1 {
setup_cluster => $pacemaker_master,
}
class { '::pacemaker::stonith':
- disable => true,
+ disable => !$enable_fencing,
+ }
+ if $enable_fencing {
+ include tripleo::fencing
+
+ # enable stonith after all fencing devices have been created
+ Class['tripleo::fencing'] -> Class['pacemaker::stonith']
}
# Only configure RabbitMQ in this step, don't start it yet to