ctdb-recoverd: Short circuit takeover run if no nodes are RUNNING
authorMartin Schwenke <martin@meltin.net>
Fri, 19 Dec 2014 04:08:40 +0000 (15:08 +1100)
committerAmitay Isaacs <amitay@samba.org>
Sun, 10 May 2015 01:22:13 +0000 (03:22 +0200)
commit7ee57b8d7c0b882227dab1f83187e44dd4639ad3
tree15b2896d4b8a382117debfcc2b18ad33eae58331
parent91f99ddfb3ba1cfb98223863ac3a474a5fbe4ea1
ctdb-recoverd: Short circuit takeover run if no nodes are RUNNING

If all nodes are still in, say, FIRST_RECOVERY runstate, then the logs
contain unfortunate noise like:

  recoverd:Failed to find node to cover ip 10.0.2.131

This avoids that by adding an early exit that avoids running
takeover_run_core() when there are no nodes in the
CTDB_RUNSTATE_RUNNING.

To support this add the runstate to the ipflags structure.  There are
clearly other ways of hacking this but this seems the simplest.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/server/ctdb_takeover.c