Having problems understanding CTDB's election process

Richard Sharpe realrichardsharpe at gmail.com
Mon Nov 24 14:45:25 MST 2014

Hi folks,

I am trying to work my way through the CTDB code to figure out how
elections work.

When the first ctdb node comes up, it will start the recoverd (which
always starts with recmaster = -1) which will call force_election.
This then sets the current node to the recovery master (via
set_recovery_mode and then sends an election request. Since there are
no other nodes at this stage, no one else will challenge us for the
position of recovery master.

However, what I can't tell from the briar patch that is CTDB, is how
do_recovery gets called or if it needs to be called when the first
CTDB node starts.

Can anyone enlighten me?

Richard Sharpe

More information about the samba-technical mailing list