aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Baldessari <michele@acksyn.org>2017-04-04 18:15:06 +0200
committerMichele Baldessari <michele@acksyn.org>2017-04-07 08:39:41 +0200
commit0a12215f908acaabba3de5ca32cea76d8a990494 (patch)
tree4d077e3126051b53331d40a6202a2ea6519df091
parent58e4dc837f77a92585a8f54d3cf642014c40bd6e (diff)
Make the cluster-check property configurable
This change will make the global cluster-check property configurable and will pick a lower default (60s) in case a pacemaker remote node is deployed. The cluster-recheck-interval is set to default to 15minutes by pacemaker. This value is too high when a pacemaker remote service is deployed. With this default value a reboot of a pacemaker remote node will be reported as offline by pacemaker for up to 15minutes. With this change we do the following: 1) Do nothing in case pacemaker remote is not deployed 2) When pacemaker remote is deployed and the operator has not specified otherwise, we set the recheck interval to 60s. 3) When the operator specifies the recheck interval we set that. Change-Id: I900952b33317b7998a1f26a65f4d70c1726df19c Closes-Bug: #1679753 (cherry picked from commit f464e9f703b824f8971ade50c32884748caffefc)
-rw-r--r--manifests/profile/base/pacemaker.pp25
1 files changed, 25 insertions, 0 deletions
diff --git a/manifests/profile/base/pacemaker.pp b/manifests/profile/base/pacemaker.pp
index 6021731..c1d745a 100644
--- a/manifests/profile/base/pacemaker.pp
+++ b/manifests/profile/base/pacemaker.pp
@@ -55,6 +55,14 @@
# (Optional) Number of seconds to sleep between remote creation tries
# Defaults to hiera('pacemaker_remote_try_sleep', 60)
#
+# [*cluster_recheck_interval*]
+# (Optional) Set the cluster-wide cluster-recheck-interval property
+# If the hiera key does not exist or if it is set to undef, the property
+# won't be changed from its default value when there are no pacemaker_remote
+# nodes. In presence of pacemaker_remote nodes and an undef value it will
+# be set to 60s.
+# Defaults to hiera('pacemaker_cluster_recheck_interval', undef)
+#
class tripleo::profile::base::pacemaker (
$step = hiera('step'),
$pcs_tries = hiera('pcs_tries', 20),
@@ -65,6 +73,7 @@ class tripleo::profile::base::pacemaker (
$remote_monitor_interval = hiera('pacemaker_remote_monitor_interval', 20),
$remote_tries = hiera('pacemaker_remote_tries', 5),
$remote_try_sleep = hiera('pacemaker_remote_try_sleep', 60),
+ $cluster_recheck_interval = hiera('pacemaker_cluster_recheck_interval', undef),
) {
if count($remote_short_node_names) != count($remote_node_ips) {
@@ -136,6 +145,22 @@ class tripleo::profile::base::pacemaker (
if $step >= 2 {
if $pacemaker_master {
include ::pacemaker::resource_defaults
+ # When we have a non-zero number of pacemaker remote nodes we
+ # want to set the cluster-recheck-interval property to something
+ # lower (unless the operator has explicitely set a value)
+ if count($remote_short_node_names) > 0 and $cluster_recheck_interval == undef {
+ pacemaker::property{ 'cluster-recheck-interval-property':
+ property => 'cluster-recheck-interval',
+ value => '60s',
+ tries => $pcs_tries,
+ }
+ } elsif $cluster_recheck_interval != undef {
+ pacemaker::property{ 'cluster-recheck-interval-property':
+ property => 'cluster-recheck-interval',
+ value => $cluster_recheck_interval,
+ tries => $pcs_tries,
+ }
+ }
}
}