Revert "ctdb-recoverd: Abort when daemon can take recovery lock during recovery"
authorMartin Schwenke <martin@meltin.net>
Mon, 4 May 2015 05:27:19 +0000 (15:27 +1000)
committerMartin Schwenke <martin@meltin.net>
Wed, 24 Feb 2016 10:44:27 +0000 (21:44 +1100)
This reverts commit 39d2fd330a60ea590d76213f8cb406a42fa8d680.

An election can occur in the middle of a recovery.  During the
election the recovery master can change.  When a node loses a round of
the election and stops being the recovery master it releases the
recovery lock.  Then at the end of the ongoing recovery all nodes are
able to take the recovery lock so they will all abort.

The most likely cause for a change in recovery master is that several
(all?) nodes are starting up and the "connected-ness" of each node is
a primary factor in winning the election.  In this situation the
recovery master can bounce around the cluster.

The simplest solution is to revert this patch so that the recovery
will fail.  The new recovery master will then start a new recovery.

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 May  4 10:40:36 CEST 2015 on sn-devel-104

(Imported from commit 20a7945a2695d7ed811237adde5af6549e53c6e9)

server/ctdb_recover.c

index 16369caf544c8231373cb8900a0da8f2cb090656..122ee088dda32c6638481f5887218dd821aa96cf 100644 (file)
@@ -536,13 +536,11 @@ static void set_recmode_handler(struct event_context *ev, struct fd_event *fde,
        */
        ret = sys_read(state->fd[0], &c, 1);
        if (ret != 1 || c != 0) {
-               const char *msg = \
-                       "Took recovery lock from daemon - probably a cluster filesystem lock coherence problem";
                ctdb_request_control_reply(
                        state->ctdb, state->c, NULL, -1,
-                       msg);
+                       "Took recovery lock from daemon during recovery - probably a cluster filesystem lock coherence problem");
                talloc_free(state);
-               ctdb_die(state->ctdb, msg);
+               return;
        }
 
        state->ctdb->recovery_mode = state->recmode;