1

I have a pacemaker cluster for DRBD primary/secondary setup and Virtual IP. I would like the master node to immediately shoot the slave, while the slave will have to wait for 15 seconds before shooting the master. My current config is something like this:

 pcs stonith create hpilo1 fence_ipmilan \
 ipaddr="10.10.10.1" \
 login="fencer" passwd="secret" \
 pcmk_host_list="storage1" lanplus=1

 pcs stonith create hpilo2 fence_ipmilan \
 ipaddr="10.10.10.2" \
 login="fencer" passwd="secret" \
 pcmk_host_list="storage2" lanplus=1

Since the roles of primary/secondary (master/slave) are not fixed so how do I make the slave wait? Is there a way to put some constraint in pacemaker maybe?

bakasan
  • 93
  • 1
  • 10

2 Answers2

0

Use the priority-fencing-delay cluster option, introduced in Pacemaker 2.0.4:

Apply specified delay for the fencings that are targeting the lost nodes with the highest total resource priority in case we don’t have the majority of the nodes in our cluster partition, so that the more significant nodes potentially win any fencing match, which is especially meaningful under split-brain of 2-node cluster. A promoted resource instance takes the base priority + 1 on calculation if the base priority is not 0. Any static/random delays that are introduced by pcmk_delay_base/max configured for the corresponding fencing resources will be added to this delay. This delay should be significantly greater than, safely twice, the maximum pcmk_delay_base/max. By default, priority fencing delay is disabled. (since 2.0.4)

As described at https://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/2.0/html/Pacemaker_Explained/s-cluster-options.html

Be sure at also add priority=1 in your cluster configuration's resource defaults.

More details can be found in this RFE.

jcharaoui
  • 322
  • 1
  • 12
0

delay parameter of fence_ipmilan resource agent

http://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/1.1/html/Clusters_from_Scratch/_example.html

NoNoNo
  • 1,939
  • 14
  • 19
  • I have already looked into it but I am looking for more flexible option. As any of the nodes could assume the role of master or slave so I would rather have the delay applied to the slave instead of a fixed node. – bakasan Apr 05 '18 at 15:43