From 1787fbc7ca58f9965cd5d64b685c1f9beed4cb9b Mon Sep 17 00:00:00 2001 From: Jiri Stransky Date: Thu, 4 Jun 2015 16:20:52 +0200 Subject: 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 --- puppet/manifests/overcloud_controller_pacemaker.pp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'puppet/manifests/overcloud_controller_pacemaker.pp') 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 -- cgit 1.2.3-korg