cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
select_test_node_and_ips
get_test_ip_mask_and_iface
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
select_test_node_and_ips
####################
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
select_test_node_and_ips
test_port=2049
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
# We need this for later, so we know how long to run nc for.
try_command_on_node any $CTDB getvar MonitorInterval
monitor_interval="${out#*= }"
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
# We need this for later, so we know how long to sleep.
try_command_on_node 0 $CTDB getvar MonitorInterval
monitor_interval="${out#*= }"
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
select_test_node_and_ips
echo "Removing ${test_ip} from the local ARP table..."
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
# We need this for later, so we know how long to run nc for.
try_command_on_node any $CTDB getvar MonitorInterval
monitor_interval="${out#*= }"
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
# We need this for later, so we know how long to sleep.
try_command_on_node 0 $CTDB getvar MonitorInterval
monitor_interval="${out#*= }"
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
# We need this for later, so we know how long to sleep.
try_command_on_node 0 $CTDB getvar MonitorInterval
monitor_interval="${out#*= }"
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
select_test_node_and_ips
echo "Removing ${test_ip} from the local neighbor table..."
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
select_test_node_and_ips
echo "Removing ${test_ip} from the local neighbor table..."
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
nfs_test_setup
echo "Create file containing random data..."
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
nfs_test_setup
echo "Create file containing random data..."
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
nfs_test_setup
echo "Create file containing random data..."
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
select_test_node_and_ips
echo "Using $test_ip, which is onnode $test_node"
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
select_test_node_and_ips
echo "Running test against node $test_node and IP $test_ip"
ctdb_test_init ()
{
- ctdb_test_restart_scheduled=false
-
trap "ctdb_test_exit" 0
ctdb_stop_all >/dev/null 2>&1 || true
return 1
}
-ctdb_restart_when_done ()
-{
- ctdb_test_restart_scheduled=true
-}
-
ctdb_base_show ()
{
echo "${CTDB_BASE:-${CTDB_SCRIPTS_BASE}}"
cluster_is_healthy
-ctdb_restart_when_done
-
try_command_on_node -v 0 "$CTDB listvars"
sanity_check_output \
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
try_command_on_node -v 0 "$CTDB ping -n 1"
sanity_check_output \
cluster_is_healthy
-ctdb_restart_when_done
-
select_test_node_and_ips
get_debug ()
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
select_test_node_and_ips
get_test_ip_mask_and_iface
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
select_test_node_and_ips
echo "Deleting IP ${test_ip} from node ${test_node}"
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
select_test_node_and_ips
echo "Emptying public addresses file on $test_node"
exit 0
fi
-# Reset configuration
-ctdb_restart_when_done
-
select_test_node_and_ips
ctdb_stop_all
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
select_test_node_and_ips
# Find interfaces on test node
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
######################################################################
try_command_on_node 0 "$CTDB listnodes -X"
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
select_test_node_and_ips
sanity_check_ips "$out"
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
make_temp_db_filename ()
{
dd if=/dev/urandom count=1 bs=512 2>/dev/null |
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
test_node=1
try_command_on_node 0 "$CTDB listnodes"
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
######################################################################
try_command_on_node 0 "$CTDB listnodes -X"
exit 0
fi
-# Reset configuration
-ctdb_restart_when_done
-
ctdb_stop_all
echo "Starting CTDB with an empty eventscript directory..."
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
select_test_node_and_ips
echo "Stopping node ${test_node}..."
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
echo "Finding out which node is the recovery master..."
try_command_on_node -v 0 "$CTDB recmaster"
test_node=$out
cluster_is_healthy
-ctdb_restart_when_done
-
TESTDB="persistent_trans.tdb"
try_command_on_node 0 "$CTDB attach $TESTDB persistent"
cluster_is_healthy
-ctdb_restart_when_done
-
TESTDB="replicated_trans.tdb"
try_command_on_node 0 "$CTDB attach $TESTDB replicated"
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
select_test_node_and_ips
echo "Running test against node $test_node and IP $test_ip"
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
testdb="rec_test.tdb"
echo "Getting list of nodes..."
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
try_command_on_node 0 "$CTDB listnodes"
num_nodes=$(echo "$out" | wc -l)
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
try_command_on_node 0 "$CTDB listnodes | wc -l"
num_nodes="$out"
echo "There are $num_nodes nodes..."
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
######################################################################
# Confirm that no nodes have databases with read-only delegations
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
do_test()
{
# Wipe Test database
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
#
# Main test
#
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
#
# Main test
#
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
#
# Main test
#
cluster_is_healthy
-# Reset configuration
-ctdb_restart_when_done
-
try_command_on_node 0 "$CTDB listnodes"
num_nodes=$(echo "$out" | wc -l)
exit 0
fi
-# Reset configuration
-ctdb_restart_when_done
-
# This is overkill but it at least provides a valid test node
select_test_node_and_ips