diff options
author | Amitay Isaacs <amitay@gmail.com> | 2014-05-06 14:15:45 +1000 |
---|---|---|
committer | Martin Schwenke <martins@samba.org> | 2014-07-07 13:29:49 +0200 |
commit | 72c6500ee440779819b9adb768a7022cc251f07e (patch) | |
tree | 452ea0f3a217733dc32713a2c145f1808b5c0fb8 | |
parent | e5cd81da77ef58992b7eb9ff7d972b499b946bb7 (diff) | |
download | samba-72c6500ee440779819b9adb768a7022cc251f07e.tar.gz samba-72c6500ee440779819b9adb768a7022cc251f07e.tar.xz samba-72c6500ee440779819b9adb768a7022cc251f07e.zip |
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 <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
-rw-r--r-- | ctdb/tools/ctdb.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c index aa0e4e3e4e..3b158fd7cd 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")); |