Allow the override of pacemaker::corosync::settle_tries
authorMichele Baldessari <michele@acksyn.org>
Fri, 27 Jan 2017 07:10:39 +0000 (08:10 +0100)
committerMichele Baldessari <michele@acksyn.org>
Fri, 27 Jan 2017 07:26:44 +0000 (08:26 +0100)
When replacing a controller node, Exec['wait-for-settle'] needs to
timeout, which means that the command pcs cluster auth will be executed
360 times with 10 seconds in between. So that means waiting for an hour
for no reason. Let's allow to override the settle_tries counter so
an operator can shorten it accordingly.

Tested this by setting CorosyncSettleTries to 100 and I correctly get
proper hiera settings:
$ hiera pacemaker::corosync::settle_tries
100

And effectively we try a number of 100 times as opposed to the 360
default:
/Stage[main]/Pacemaker::Corosync/Exec[reauthenticate-across-all-nodes]/returns
(debug): Exec try 1/100

Change-Id: I5e21b4215cb0b8686d2059b3d71e2444a96719dc
Closes-Bug: #1659741

puppet/services/pacemaker.yaml

index a8a9fb9..c47229f 100644 (file)
@@ -39,6 +39,12 @@ parameters:
     description: The password for the 'pcsd' user for pacemaker.
     hidden: true
     default: ''
+  CorosyncSettleTries:
+    type: number
+    description: Number of tries for cluster settling. This has the
+                 same default as the pacemaker puppet module. Override
+                 to a smaller value when in need to replace a controller node.
+    default: 360
   FencingConfig:
     default: {}
     description: |
@@ -97,6 +103,7 @@ outputs:
         pacemaker::resource_defaults::defaults:
           resource-stickiness: { value: INFINITY }
         corosync_token_timeout: 10000
+        pacemaker::corosync::settle_tries: {get_param: CorosyncSettleTries}
         tripleo.pacemaker.firewall_rules:
           '130 pacemaker tcp':
             proto: 'tcp'