From 72c6500ee440779819b9adb768a7022cc251f07e Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Tue, 6 May 2014 14:15:45 +1000 Subject: [PATCH] ctdb-tools: There is no need for forcing a recovery This effectively reverts commit 442953c540424ad0c64f4264b5ee27c45a3130e8. The correct way of telling recovery daemon to trigger a database recovery is by setting recovery mode to active. There is no need to freeze databases as recovery master will do that across the cluster anyway. Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke --- ctdb/tools/ctdb.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c index aa0e4e3e4ea..3b158fd7cdb 100644 --- a/ctdb/tools/ctdb.c +++ b/ctdb/tools/ctdb.c @@ -3463,23 +3463,10 @@ static int control_recover(struct ctdb_context *ctdb, int argc, const char **arg { int ret; uint32_t generation, next_generation; - bool force; - - /* "force" option ignores freeze failure and forces recovery */ - force = (argc == 1) && (strcasecmp(argv[0], "force") == 0); /* record the current generation number */ generation = get_generation(ctdb); - ret = ctdb_ctrl_freeze_priority(ctdb, TIMELIMIT(), options.pnn, 1); - if (ret != 0) { - if (!force) { - DEBUG(DEBUG_ERR, ("Unable to freeze node\n")); - return ret; - } - DEBUG(DEBUG_WARNING, ("Unable to freeze node but proceeding because \"force\" option given\n")); - } - ret = ctdb_ctrl_setrecmode(ctdb, TIMELIMIT(), options.pnn, CTDB_RECOVERY_ACTIVE); if (ret != 0) { DEBUG(DEBUG_ERR, ("Unable to set recovery mode\n")); -- 2.11.4.GIT