[ClusterLabs] Creating a rule based on whether a quorum exists
les at greemo.com
Mon May 30 09:13:47 EDT 2016
I have a two-node cluster with no-quorum-policy=ignore and an external
ping responder to try to determine if a node has its network down (it's
the dead one), or if the other node is really dead..
The ping helps to determine who the master is.
I have realised in the situation where the ping responder goes down,
both stop being the master.
Code can be seen here: https://github.com/greemo/vagrant-fabric
I currently have the following rule which prevents a node becoming a
master unless it can access the ping resource. (I may add more ping
<rsc_colocation id="c_mysql_on_drbd" score="INFINITY"
rsc="g_mysql" with-rsc="ms_drbd_mysql" with-rsc-role="Master"/>
<rsc_location id="l_drbd_master_on_ping" rsc="ms_drbd_mysql">
<rule role="Master" score="-INFINITY" boolean-op="or"
<expression attribute="ping" operation="not_defined"
<expression attribute="ping" operation="lte" value="1000"
<rsc_order id="o_drbd_before_mysql" score="INFINITY"
first="ms_drbd_mysql" first-action="promote" then="g_mysql"
I want to create a rule that says "if I am not in a quorum AND I cannot
access all the ping resources, do not become the master". I can sort out
the ping part, but how can I determine within a Pacemaker rule if I am
part of a quorum?
I have thought to set up a cron job using shell tools to query the CIB
and populate an attribute, but surely there has to be an easier way...
More information about the Users