diff options
author | Martin Schwenke <martin@meltin.net> | 2019-01-10 14:01:57 +1100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2019-03-04 10:37:54 +0000 |
commit | 4c059e03ef75085c47c8ec15025655b0efdf8460 (patch) | |
tree | 6f1499507b9ccbb59b01df13bd2a08d10db4aca2 /ctdb | |
parent | fd9a02c0bb29778c3b049de4437bec2ce50542ea (diff) | |
download | samba-4c059e03ef75085c47c8ec15025655b0efdf8460.tar.gz |
ctdb-recoverd: Ban node on unknown error when taking recovery lock
We really shouldn't see unknown errors. They probably represent a
misconfigured recovery lock or similar.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13800
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit 45a77d65b2e39b4af94da4ab99575f4ee08a7ebd)
Diffstat (limited to 'ctdb')
-rw-r--r-- | ctdb/server/ctdb_recoverd.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c index 560e632d028..47ccda15a1a 100644 --- a/ctdb/server/ctdb_recoverd.c +++ b/ctdb/server/ctdb_recoverd.c @@ -923,6 +923,17 @@ static void take_reclock_handler(char status, default: D_ERR("Unable to take recover lock - unknown error\n"); + + { + struct ctdb_recoverd *rec = s->rec; + struct ctdb_context *ctdb = rec->ctdb; + uint32_t pnn = ctdb_get_pnn(ctdb); + + D_ERR("Banning this node\n"); + ctdb_ban_node(rec, + pnn, + ctdb->tunable.recovery_ban_period); + } } s->done = true; |