server: if takeover runs when the recovery master becomes unhealthy
authorStefan Metzmacher <metze@samba.org>
Fri, 9 Oct 2009 13:47:49 +0000 (15:47 +0200)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Mon, 26 Oct 2009 03:21:45 +0000 (14:21 +1100)
commit8ec633b64a05a2d903c2b9639909f15f6375548f
treee9956fdaae3fe38659b89545443a1130b39ae2aa
parent440e870d61267054b24404bcb69e599226353949
server: if takeover runs when the recovery master becomes unhealthy

The problem was this:

When the monitor event fails, the node->flags get updated,
and an update (containing the old and new flags) is sent to
the recovery master.

If the recovery master sends the update to itself (the same process),
it was compairing the node->flags variable with the received new flags.
This check always found both flag values to be equal
and never sets the rec->need_takeover_run variable to true.

There were two problem, first the push_flags_handler() function
didn't pass the received old flags.

And the ctdb_control_modflags() function ignored the received old flags.

metze
server/ctdb_monitor.c
server/ctdb_recoverd.c