recoverd: Backward compatibility for nodes without IPREALLOCATED control
authorMartin Schwenke <martin@meltin.net>
Mon, 27 May 2013 01:29:42 +0000 (11:29 +1000)
committerMartin Schwenke <martin@meltin.net>
Mon, 27 May 2013 05:15:25 +0000 (15:15 +1000)
commit1ab2bbb349ce158d1cb4b3800f60a30058cf92d7
treeaf58632732402ebe472245f6d30cc020579c8c96
parent66019e32879a09094836d9a263a413397a5d2010
recoverd: Backward compatibility for nodes without IPREALLOCATED control

Consider the case of upgrading a cluster node by node, where some
nodes are still running older versions of CTDB without the
IPREALLOCATED control.  If a "new" node takes over as recovery master
and a failover occurs, then it will attempt to send IPREALLOCATED
controls to all nodes.  The "old" nodes will fail in a fairly
nondescript way (result == -1).

To try to handle this situation, fall back to the EVENTSCRIPT control
to handle "ipreallocated".  Only do this on the failed nodes.
However, do not do this on nodes that timed out (they've probably
implemented the control and we should call the regular fail_callback
to get those nodes banned) or for stopped nodes (since they can't
actually run the "ipreallocated" event via the EVENTSCRIPT control).

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit b2654853ce9b7c18c5874b080bc94d3118078a5d)
ctdb/server/ctdb_takeover.c