[ClusterLabs Developers] Master scores ignored during cluster startup
Jehan-Guillaume de Rorthais
jgdr at dalibo.com
Tue Aug 29 16:55:54 EDT 2017
Hi all,
We discussed this issue with Ken Gaillot and Lars Ellenberg today on IRC. This
is just a sum up of the problem.
Some users reported me that the PAF RA was not promoting the master after a
cluster startup. The problem is that PAF is using master score with "-l
forever", not transient ones disappearing on cluster reboot ("-l reboot"). It
expects the master scores to be present on cluster start.
So basically, on cluster startup, the master score is just ignored and no slave
is being promoted...before the next cluster recheck (default to 15min later).
You could reproduce the issue using the RA attached to this email and the
following scenario:
pcs cluster setup --name cluster_demo srv1 srv2
pcs cluster start --all
pcs cluster cib cluster1.xml
pcs -f cluster1.xml property set stonith-enabled=false
pcs -f cluster1.xml resource create stateful stateful-custom \
op monitor interval=10s role="Master" \
op monitor interval=11s role="Slave"
pcs -f cluster1.xml resource master stateful-ha stateful
pcs cluster cib-push cluster1.xml
crm_master -r stateful -l forever -v 1
# the master is elected and set its score to 10
pcs cluster stop --all
pcs cluster start --all
# no master elected despite the master score
Our discussion led to the theory that this might be correlated to this
commit where master score is ignored for a resource if it is not started yet:
https://github.com/beekhof/pacemaker/commit/65f1a22a4b66581159d8b747dbd49fa5e2ef34e1
If this is the actual issue, I suppose this should be improved to detect if
another master is existing or not before ignoring the master score. Or maybe to
detect if we are in a cluster startup or enabling the stateful resource in the
cluster.
Thoughts?
Regards,
--
Jehan-Guillaume de Rorthais
Dalibo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stateful-custom
Type: application/octet-stream
Size: 4696 bytes
Desc: not available
URL: <http://lists.clusterlabs.org/pipermail/developers/attachments/20170829/bb2f0325/attachment-0002.obj>
More information about the Developers
mailing list