ctdb-recoverd: Time out attempt to take recovery lock after 120s
authorMartin Schwenke <martin@meltin.net>
Fri, 22 Feb 2019 04:09:33 +0000 (15:09 +1100)
committerKarolin Seeger <kseeger@samba.org>
Mon, 4 Mar 2019 10:37:54 +0000 (10:37 +0000)
Currently this will wait forever.  It really needs a timeout in case
the cluster filesystem (or other lock mechanism) is completely wedged.

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 13a1a4808935290dceb219daccd7aac3fda4e184)

ctdb/server/ctdb_recoverd.c

index 47ccda15a1a8196b93690ee79c46a2aa0f17c41d..469fd21b463ad17db2c58b881ff5ef52baf5bc62 100644 (file)
@@ -972,7 +972,7 @@ static bool ctdb_recovery_lock(struct ctdb_recoverd *rec)
        h = ctdb_cluster_mutex(s,
                               ctdb,
                               ctdb->recovery_lock,
-                              0,
+                              120,
                               take_reclock_handler,
                               s,
                               lost_reclock_handler,