diff options
author | Martin Schwenke <martin@meltin.net> | 2017-09-04 14:18:49 +1000 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2017-09-14 14:49:15 +0200 |
commit | 53ae91a4f74c7a623077fa88e8f1a3a7fa55a5aa (patch) | |
tree | 24303d05ce5730e73bac86a8ad7b5547617fd4aa /ctdb | |
parent | 19318d28354190a9cfafa1696e41c90351f85af9 (diff) | |
download | samba-53ae91a4f74c7a623077fa88e8f1a3a7fa55a5aa.tar.gz |
ctdb-tools: Drop monitoring-related ctdb commands
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb')
-rwxr-xr-x | ctdb/tests/tool/ctdb.disablemonitor.001.sh | 26 | ||||
-rwxr-xr-x | ctdb/tests/tool/ctdb.enablemonitor.001.sh | 32 | ||||
-rwxr-xr-x | ctdb/tests/tool/ctdb.getmonmode.001.sh | 15 | ||||
-rw-r--r-- | ctdb/tools/ctdb.c | 64 |
4 files changed, 0 insertions, 137 deletions
diff --git a/ctdb/tests/tool/ctdb.disablemonitor.001.sh b/ctdb/tests/tool/ctdb.disablemonitor.001.sh deleted file mode 100755 index d9380a1292f..00000000000 --- a/ctdb/tests/tool/ctdb.disablemonitor.001.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -. "${TEST_SCRIPTS_DIR}/unit.sh" - -define_test "basic monitor disable" - -setup_ctdbd <<EOF -NODEMAP -0 192.168.20.41 0x0 CURRENT RECMASTER -1 192.168.20.42 0x0 -2 192.168.20.43 0x0 -EOF - -ok_null -simple_test - -ok "DISABLED" -simple_test_other getmonmode - -# Idempotence - -ok_null -simple_test - -ok "DISABLED" -simple_test_other getmonmode diff --git a/ctdb/tests/tool/ctdb.enablemonitor.001.sh b/ctdb/tests/tool/ctdb.enablemonitor.001.sh deleted file mode 100755 index cc1eea666f3..00000000000 --- a/ctdb/tests/tool/ctdb.enablemonitor.001.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -. "${TEST_SCRIPTS_DIR}/unit.sh" - -define_test "basic monitor enable" - -setup_ctdbd <<EOF -NODEMAP -0 192.168.20.41 0x0 CURRENT RECMASTER -1 192.168.20.42 0x0 -2 192.168.20.43 0x0 -EOF - -ok_null -simple_test_other disablemonitor - -ok "DISABLED" -simple_test_other getmonmode - -ok_null -simple_test - -ok "ENABLED" -simple_test_other getmonmode - -# Idempotence - -ok_null -simple_test - -ok "ENABLED" -simple_test_other getmonmode diff --git a/ctdb/tests/tool/ctdb.getmonmode.001.sh b/ctdb/tests/tool/ctdb.getmonmode.001.sh deleted file mode 100755 index 5e13dc7857d..00000000000 --- a/ctdb/tests/tool/ctdb.getmonmode.001.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -. "${TEST_SCRIPTS_DIR}/unit.sh" - -define_test "basic get monitor mode" - -setup_ctdbd <<EOF -NODEMAP -0 192.168.20.41 0x0 CURRENT RECMASTER -1 192.168.20.42 0x0 -2 192.168.20.43 0x0 -EOF - -ok "ENABLED" -simple_test diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c index 52e4ea8ccb4..60d7a172b2d 100644 --- a/ctdb/tools/ctdb.c +++ b/ctdb/tools/ctdb.c @@ -2159,26 +2159,6 @@ static int control_cattdb(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb, return ret; } -static int control_getmonmode(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb, - int argc, const char **argv) -{ - int mode, ret; - - if (argc != 0) { - usage("getmonmode"); - } - - ret = ctdb_ctrl_get_monmode(mem_ctx, ctdb->ev, ctdb->client, - ctdb->cmd_pnn, TIMEOUT(), &mode); - if (ret != 0) { - return ret; - } - - printf("%s\n", - (mode == CTDB_MONITORING_ENABLED) ? "ENABLED" : "DISABLED"); - return 0; -} - static int control_getcapabilities(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb, int argc, const char **argv) @@ -2246,44 +2226,6 @@ static int control_lvs(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb, return run_helper(mem_ctx, "LVS helper", lvs_helper, argc, argv); } -static int control_disable_monitor(TALLOC_CTX *mem_ctx, - struct ctdb_context *ctdb, - int argc, const char **argv) -{ - int ret; - - if (argc != 0) { - usage("disablemonitor"); - } - - ret = ctdb_ctrl_disable_monitor(mem_ctx, ctdb->ev, ctdb->client, - ctdb->cmd_pnn, TIMEOUT()); - if (ret != 0) { - return ret; - } - - return 0; -} - -static int control_enable_monitor(TALLOC_CTX *mem_ctx, - struct ctdb_context *ctdb, - int argc, const char **argv) -{ - int ret; - - if (argc != 0) { - usage("enablemonitor"); - } - - ret = ctdb_ctrl_enable_monitor(mem_ctx, ctdb->ev, ctdb->client, - ctdb->cmd_pnn, TIMEOUT()); - if (ret != 0) { - return ret; - } - - return 0; -} - static int control_setdebug(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb, int argc, const char **argv) { @@ -5950,18 +5892,12 @@ static const struct ctdb_cmd { "dump cluster-wide ctdb database", "<dbname|dbid>" }, { "cattdb", control_cattdb, false, false, "dump local ctdb database", "<dbname|dbid>" }, - { "getmonmode", control_getmonmode, false, true, - "show monitoring mode", NULL }, { "getcapabilities", control_getcapabilities, false, true, "show node capabilities", NULL }, { "pnn", control_pnn, false, false, "show the pnn of the currnet node", NULL }, { "lvs", control_lvs, false, false, "show lvs configuration", "master|list|status" }, - { "disablemonitor", control_disable_monitor, false, true, - "disable monitoring", NULL }, - { "enablemonitor", control_enable_monitor, false, true, - "enable monitoring", NULL }, { "setdebug", control_setdebug, false, true, "set debug level", "ERROR|WARNING|NOTICE|INFO|DEBUG" }, { "getdebug", control_getdebug, false, true, |