[PATCH]: Inconsistent recmaster during election.

Kenny Dinh kdinh at peaxy.net
Mon Dec 28 21:04:16 UTC 2015


Hello,

I have a cluster with 2 CTDB nodes.  My test does the following:

* Restart ctdb service on RecMaster node (Node 1).
* Restart ctdb service on NonRecMaster node (Node 0).
* When ctdb service on NonRecMaster(0) is started, it triggered an election.
* During the election process, NonRecMaster(0) node responded to
"CTDB_CONTROL_GET_RECMASTER" from RecMaster(1) with Node 1 as the
recmaster.  However, when processing the election message, NonRecMaster(0)
node indicated that it won the election.  The inconsistency caused the
RecMaster(1) to trigger new election.  The cycle is repeated 4 times until
RecMaster(1) decided to ban the culprit( Node 0).

Attached are the ctdb log from RecMaster and NonRecMaster, and a proposed
patch.  Essentially, NonRecMaster should not win the election if it
responded that a different node is the recovery master.

Please verify if my patch is correct.

Thanks,
Kenny
-------------- next part --------------
A non-text attachment was scrubbed...
Name: banned_node.ctdbd.log
Type: application/octet-stream
Size: 47734 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20151228/9ac22de8/banned_node.ctdbd.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: do-not-win-election-if-not-recmaster.patch
Type: application/octet-stream
Size: 1080 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20151228/9ac22de8/do-not-win-election-if-not-recmaster.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: recmaster.ctdbd.log
Type: application/octet-stream
Size: 14434 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20151228/9ac22de8/recmaster.ctdbd.obj>


More information about the samba-technical mailing list