ctdb-tool: Remove xpnn command and related tests
authorAmitay Isaacs <amitay@gmail.com>
Thu, 28 Apr 2016 03:32:31 +0000 (13:32 +1000)
committerAmitay Isaacs <amitay@samba.org>
Tue, 10 May 2016 20:51:22 +0000 (22:51 +0200)
It's unreliable and should not be used.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/tests/tool/stubby.xpnn.001.sh [deleted file]
ctdb/tests/tool/stubby.xpnn.002.sh [deleted file]
ctdb/tests/tool/stubby.xpnn.003.sh [deleted file]
ctdb/tools/ctdb.c

diff --git a/ctdb/tests/tool/stubby.xpnn.001.sh b/ctdb/tests/tool/stubby.xpnn.001.sh
deleted file mode 100755 (executable)
index e59e40c..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-. "${TEST_SCRIPTS_DIR}/unit.sh"
-
-define_test "3 nodes, current is 0"
-
-setup_nodes <<EOF
-192.168.20.41
-192.168.20.42
-192.168.20.43
-EOF
-
-required_result 0 "PNN:0"
-
-simple_test <<EOF
-NODEMAP
-0       192.168.20.41   0x0     CURRENT
-1       192.168.20.42   0x0
-2       192.168.20.43   0x0
-EOF
diff --git a/ctdb/tests/tool/stubby.xpnn.002.sh b/ctdb/tests/tool/stubby.xpnn.002.sh
deleted file mode 100755 (executable)
index cc4f38c..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-. "${TEST_SCRIPTS_DIR}/unit.sh"
-
-define_test "3 nodes, current is 2"
-
-setup_nodes <<EOF
-192.168.20.41
-192.168.20.42
-192.168.20.43
-EOF
-
-required_result 0 "PNN:2"
-
-simple_test <<EOF
-NODEMAP
-0       192.168.20.41   0x0
-1       192.168.20.42   0x0
-2       192.168.20.43   0x0     CURRENT
-EOF
diff --git a/ctdb/tests/tool/stubby.xpnn.003.sh b/ctdb/tests/tool/stubby.xpnn.003.sh
deleted file mode 100755 (executable)
index 8e24c24..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-. "${TEST_SCRIPTS_DIR}/unit.sh"
-
-define_test "missing nodes file"
-
-setup_nodes <<EOF
-192.168.20.41
-192.168.20.42
-192.168.20.43
-EOF
-
-rm -f "$CTDB_NODES"
-
-required_result 255 <<EOF
-${TEST_DATE_STAMP}Failed to read nodes file "${CTDB_NODES}"
-EOF
-
-simple_test <<EOF
-NODEMAP
-0       192.168.20.41   0x0     CURRENT
-1       192.168.20.42   0x0
-2       192.168.20.43   0x0
-EOF
index 58c8339a13a30675c0aa0f9798921e1f7219e74c..a4676579e084319c819ce11a7c3dbed96a2fee07 100644 (file)
@@ -935,21 +935,6 @@ static int find_node_xpnn(void)
        return -1;
 }
 
-static int control_xpnn(struct ctdb_context *ctdb, int argc, const char **argv)
-{
-       uint32_t pnn;
-
-       assert_single_node_only();
-
-       pnn = find_node_xpnn();
-       if (pnn == -1) {
-               return -1;
-       }
-
-       printf("PNN:%d\n", pnn);
-       return 0;
-}
-
 /* Helpers for ctdb status
  */
 static bool is_partially_online(struct ctdb_context *ctdb, struct ctdb_node_and_flags *node)
@@ -5826,7 +5811,6 @@ static const struct {
        { "enablescript",     control_enablescript,  true,      false, "enable an eventscript", "<script>"},
        { "disablescript",    control_disablescript,  true,     false, "disable an eventscript", "<script>"},
        { "natgw",            control_natgw,            false,  true, "show NAT gateway configuration ", "[master|list|status]"},
-       { "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]"},
        { "setlmasterrole",   control_setlmasterrole,   false,  false, "Set LMASTER role to on/off", "{on|off}"},