tools/ctdb: Improve auto-all settings for some commands
authorMartin Schwenke <martin@meltin.net>
Mon, 19 Aug 2013 03:54:49 +0000 (13:54 +1000)
committerAmitay Isaacs <amitay@gmail.com>
Thu, 22 Aug 2013 07:00:20 +0000 (17:00 +1000)
* ipreallocate is cluster-wide so should not be auto-all

* enablescript, disablescript, getreclock, setreclock, natgwlist can
  all be auto-all without issues

* xpnn, ipiface a local-only so don't work with -n, so might as well
  not be auto-all

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 123a4677528cb46bee1c6dad8a5162eba9880bc1)

ctdb/tools/ctdb.c

index eeff5480baa31b7788633ba04fc8a64525324818..fb74d43dc4837a2037077dd90825c30be06a9ab8 100644 (file)
@@ -5907,7 +5907,7 @@ static const struct {
        { "shutdown",        control_shutdown,          true,   false,  "shutdown ctdbd" },
        { "recover",         control_recover,           true,   false,  "force recovery" },
        { "sync",            control_ipreallocate,      false,  false,  "wait until ctdbd has synced all state changes" },
-       { "ipreallocate",    control_ipreallocate,      true,   false,  "force the recovery daemon to perform a ip reallocation procedure" },
+       { "ipreallocate",    control_ipreallocate,      false,  false,  "force the recovery daemon to perform a ip reallocation procedure" },
        { "thaw",            control_thaw,              true,   false,  "thaw databases", "[priority:1-3]" },
        { "isnotrecmaster",  control_isnotrecmaster,    false,  false,  "check if the local node is recmaster or not" },
        { "killtcp",         kill_tcp,                  false,  false, "kill a tcp connection.", "[<srcip:port> <dstip:port>]" },
@@ -5938,12 +5938,12 @@ static const struct {
        { "wipedb",           control_wipedb,        false,     false, "wipe the contents of a database.", "<dbname|dbid>"},
        { "recmaster",        control_recmaster,        true,   false, "show the pnn for the recovery master."},
        { "scriptstatus",     control_scriptstatus,     true,   false, "show the status of the monitoring scripts (or all scripts)", "[all]"},
-       { "enablescript",     control_enablescript,  false,     false, "enable an eventscript", "<script>"},
-       { "disablescript",    control_disablescript,  false,    false, "disable an eventscript", "<script>"},
-       { "natgwlist",        control_natgwlist,        false,  false, "show the nodes belonging to this natgw configuration"},
-       { "xpnn",             control_xpnn,             true,   true,  "find the pnn of the local node without talking to the daemon (unreliable)" },
-       { "getreclock",       control_getreclock,       false,  false, "Show the reclock file of a node"},
-       { "setreclock",       control_setreclock,       false,  false, "Set/clear the reclock file of a node", "[filename]"},
+       { "enablescript",     control_enablescript,  true,      false, "enable an eventscript", "<script>"},
+       { "disablescript",    control_disablescript,  true,     false, "disable an eventscript", "<script>"},
+       { "natgwlist",        control_natgwlist,        true,   false, "show the nodes belonging to this natgw configuration"},
+       { "xpnn",             control_xpnn,             false,  true,  "find the pnn of the local node without talking to the daemon (unreliable)" },
+       { "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]"},
        { "setnatgwstate",    control_setnatgwstate,    false,  false, "Set NATGW state to on/off", "{on|off}"},
        { "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}"},
@@ -5967,7 +5967,7 @@ static const struct {
        { "nodestatus",      control_nodestatus,        true,   false,  "show and return node status" },
        { "dbstatistics",    control_dbstatistics,      false,  false, "show db statistics", "<dbname|dbid>" },
        { "reloadips",       control_reloadips,         false,  false, "reload the public addresses file on a node" },
-       { "ipiface",         control_ipiface,           true,   true,  "Find which interface an ip address is hsoted on", "<ip>" },
+       { "ipiface",         control_ipiface,           false,  true,  "Find which interface an ip address is hsoted on", "<ip>" },
 };
 
 /*