1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00

ctdb-tool: Remove xpnn command and related tests

It's unreliable and should not be used.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
Amitay Isaacs 2016-04-28 13:32:31 +10:00 committed by Amitay Isaacs
parent e35ffb06bc
commit e36a20145d
4 changed files with 0 additions and 80 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View 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}"},