ctdb_test_skip_on_cluster
-ctdb_test_init -n
-
echo "Starting CTDB with failover disabled..."
-ctdb_nodes_start_custom -F
+ctdb_test_init -F
+
+cluster_is_healthy
echo "Getting IP allocation..."
try_command_on_node -v any "$CTDB ip all | tail -n +2"
echo "----------------------------------------"
echo "Starting CTDB with an empty public addresses configuration..."
-ctdb_nodes_start_custom -P /dev/null
+ctdb_test_init -P /dev/null
+
+cluster_is_healthy
echo "Trying explicit ipreallocate..."
try_command_on_node any $CTDB ipreallocate
ctdb_test_skip_on_cluster
-ctdb_test_init -n
-
echo "Starting CTDB with recovery lock command configured..."
-ctdb_nodes_start_custom -R
+ctdb_test_init -R
+
+cluster_is_healthy
echo "Good, that seems to work!"
ctdb_test_cleanup_pid=""
}
-# -n option means do not configure/start cluster
ctdb_test_init ()
{
trap "ctdb_test_exit" 0
ctdb_nodes_stop >/dev/null 2>&1 || true
- if [ "$1" != "-n" ] ; then
- echo "Configuring cluster..."
- setup_ctdb || ctdb_test_error "Cluster configuration failed"
-
- echo "Starting cluster..."
- ctdb_init || ctdb_test_error "Cluster startup failed"
- fi
-
- echo "*** SETUP COMPLETE AT $(date '+%F %T'), RUNNING TEST..."
-}
-
-ctdb_nodes_start_custom ()
-{
- if ctdb_test_on_cluster ; then
- ctdb_test_error "ctdb_nodes_start_custom() on real cluster"
- fi
-
- ctdb_nodes_stop >/dev/null 2>&1 || true
-
echo "Configuring cluster..."
setup_ctdb "$@" || ctdb_test_error "Cluster configuration failed"
echo "Starting cluster..."
- ctdb_init || ctdb_test_fail "Cluster startup failed"
+ ctdb_init || ctdb_test_error "Cluster startup failed"
+
+ echo "*** SETUP COMPLETE AT $(date '+%F %T'), RUNNING TEST..."
}
ctdb_test_skip_on_cluster ()