mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
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 <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
a3c2a39ea2
commit
d3da6f0eb9
@ -967,43 +967,6 @@ DB Statistics: locking.tdb
|
||||
|
||||
</refsect2>
|
||||
|
||||
<refsect2>
|
||||
<title>
|
||||
setreclock <optional><parameter>FILE</parameter></optional>
|
||||
</title>
|
||||
|
||||
<para>
|
||||
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.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If no FILE is specified then a recovery lock file will no
|
||||
longer be used.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This command only affects the run-time setting of a single
|
||||
CTDB node. This setting <emphasis>must</emphasis> be changed
|
||||
on all nodes simultaneously. For information about configuring
|
||||
the recovery lock file please see the
|
||||
<citetitle>CTDB_RECOVERY_LOCK</citetitle> entry in
|
||||
<citerefentry><refentrytitle>ctdbd.conf</refentrytitle>
|
||||
<manvolnum>5</manvolnum></citerefentry> and the
|
||||
<citetitle>--reclock</citetitle> entry in
|
||||
<citerefentry><refentrytitle>ctdbd</refentrytitle>
|
||||
<manvolnum>1</manvolnum></citerefentry>. For information
|
||||
about the recovery lock please see the <citetitle>RECOVERY
|
||||
LOCK</citetitle> section in
|
||||
<citerefentry><refentrytitle>ctdb</refentrytitle>
|
||||
<manvolnum>7</manvolnum></citerefentry>.
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
|
||||
|
||||
<refsect2>
|
||||
<title>getdebug</title>
|
||||
<para>
|
||||
|
@ -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", "<script>"},
|
||||
{ "natgw", control_natgw, false, true, "show NAT gateway configuration ", "[master|list|status]"},
|
||||
{ "getreclock", control_getreclock, true, false, "Show the reclock file of a node"},
|
||||
{ "setreclock", control_setreclock, true, false, "Set/clear the reclock file of a node", "[filename]"},
|
||||
{ "setlmasterrole", control_setlmasterrole, false, false, "Set LMASTER role to on/off", "{on|off}"},
|
||||
{ "setrecmasterrole", control_setrecmasterrole, false, false, "Set RECMASTER role to on/off", "{on|off}"},
|
||||
{ "setdbprio", control_setdbprio, false, false, "Set DB priority", "<dbname|dbid> <prio:1-3>"},
|
||||
|
Loading…
x
Reference in New Issue
Block a user