ctdb-recovery: Ban a node that causes recovery failure
authorMartin Schwenke <martin@meltin.net>
Mon, 29 Oct 2018 03:33:08 +0000 (14:33 +1100)
committerAmitay Isaacs <amitay@samba.org>
Mon, 5 Nov 2018 05:52:33 +0000 (06:52 +0100)
commit27df4f002a594dbb2f2a38afaccf3e22f19818e1
treec9bdb6b44e52239aabb24f7ea6d52b5fc2e1c3c9
parent3338a3e257fa9f285ae639d6ac382e3e234be90e
ctdb-recovery: Ban a node that causes recovery failure

... instead of applying banning credits.

There have been a couple of cases where recovery repeatedly takes just
over 2 minutes to fail.  Therefore, banning credits expire between
failures and a continuously problematic node is never banned,
resulting in endless recoveries.  This is because it takes 2
applications of banning credits before a node is banned, which
generally involves 2 recovery failures.

The recovery helper makes up to 3 attempts to recover each database
during a single run.  If a node causes 3 failures then this is really
equivalent to 3 recovery failures in the model that existed before the
recovery helper added retries.  In that case the node would have been
banned after 2 failures.

So, instead of applying banning credits to the "most failing" node,
simply ban it directly from the recovery helper.

If multiple nodes are causing recovery failures then this can cause a
node to be banned more quickly than it might otherwise have been, even
pre-recovery-helper.  However, 90 seconds (i.e. 3 failures) is a long
time to be in recovery, so banning earlier seems like the best
approach.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13670

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Mon Nov  5 06:52:33 CET 2018 on sn-devel-144
ctdb/server/ctdb_recovery_helper.c