From d3da6f0eb91bb38fce4fba9151de93aefda2f32c Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Tue, 1 Mar 2016 12:32:48 +1100 Subject: [PATCH] ctdb-tool: Drop support for "ctdb setreclock" command The recovery lock can not be reliably updated at run-time. If it fails to update on some nodes then split-brain protection is gone and there is no reasonable way to repair the situation. CTDB will have to be restarted on all nodes. So, if this feature is being used to avoid scheduling an outage then an outage will have to be scheduled just in case! To update the recovery lock, shut down CTDB on all nodes, reconfigure the recovery lock and start CTDB again. Those that *really* want to be able to change the recovery lock at run-time can still do so. Set CTDB_RECOVERY_LOCK to point to a script and this script can then be modified at run-time. However, please don't report bugs if bad things happen... Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- ctdb/doc/ctdb.1.xml | 37 ------------------------------------- ctdb/tools/ctdb.c | 25 ------------------------- 2 files changed, 62 deletions(-) diff --git a/ctdb/doc/ctdb.1.xml b/ctdb/doc/ctdb.1.xml index cbdc5c7847f..bbe102fdb44 100644 --- a/ctdb/doc/ctdb.1.xml +++ b/ctdb/doc/ctdb.1.xml @@ -967,43 +967,6 @@ DB Statistics: locking.tdb - - - setreclock <optional><parameter>FILE</parameter></optional> - - - - FILE specifies the name of the recovery lock file. If the - recovery lock file is changed at run-time then this will cause - a recovery, which in turn causes the recovery lock to be - retaken. - - - - If no FILE is specified then a recovery lock file will no - longer be used. - - - - This command only affects the run-time setting of a single - CTDB node. This setting must be changed - on all nodes simultaneously. For information about configuring - the recovery lock file please see the - CTDB_RECOVERY_LOCK entry in - ctdbd.conf - 5 and the - --reclock entry in - ctdbd - 1. For information - about the recovery lock please see the RECOVERY - LOCK section in - ctdb - 7. - - - - - getdebug diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c index b6f7c45c847..d09cd039126 100644 --- a/ctdb/tools/ctdb.c +++ b/ctdb/tools/ctdb.c @@ -4228,30 +4228,6 @@ static int control_getreclock(struct ctdb_context *ctdb, int argc, const char ** return 0; } -/* - set the reclock file of a node - */ -static int control_setreclock(struct ctdb_context *ctdb, int argc, const char **argv) -{ - int ret; - const char *reclock = NULL; - - if (argc == 0) { - reclock = NULL; - } else if (argc == 1) { - reclock = argv[0]; - } else { - usage(); - } - - ret = ctdb_ctrl_setreclock(ctdb, TIMELIMIT(), options.pnn, reclock); - if (ret != 0) { - DEBUG(DEBUG_ERR, ("Unable to get reclock file from node %u\n", options.pnn)); - return ret; - } - return 0; -} - /* set the lmaster role on/off */ @@ -5824,7 +5800,6 @@ static const struct { { "disablescript", control_disablescript, true, false, "disable an eventscript", "