mirror of
https://github.com/samba-team/samba.git
synced 2025-08-29 13:49:30 +03:00
Remove old ctdbd.sh test script. Remove unneeded nodes.txt and
public_addresses files - these are now created in tests/var as needed. 09_ctdb_ping.sh now recognises new "node disconnected" message. Replace custom recovery detection code (which could not have been working) with a call to "ctdb recover" in 32_ctdb_enable_simple.sh. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 486ed3b5b483f1c12c2d978ec6564bd33a2c6aee)
This commit is contained in:
@ -1,50 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
killall -q ctdbd
|
||||
|
||||
tests/start_daemons.sh 2 || exit 1
|
||||
|
||||
echo "Testing ping"
|
||||
$VALGRIND bin/ctdb ping || exit 1 # Done
|
||||
|
||||
echo "Testing status"
|
||||
$VALGRIND bin/ctdb status || exit 1 # Done: implied
|
||||
|
||||
echo "Testing statistics"
|
||||
$VALGRIND bin/ctdb -n all statistics || exit 1 # Done
|
||||
|
||||
echo "Testing statisticsreset"
|
||||
$VALGRIND bin/ctdb -n all statisticsreset || exit 1 # Done
|
||||
|
||||
echo "Testing debug"
|
||||
$VALGRIND bin/ctdb -n all setdebug 3 || exit 1 # Done
|
||||
$VALGRIND bin/ctdb -n all getdebug || exit 1 # Done
|
||||
$VALGRIND bin/ctdb -n all setdebug 0 || exit 1 # Done
|
||||
$VALGRIND bin/ctdb -n all getdebug || exit 1 # Done
|
||||
|
||||
echo "Attaching to some databases"
|
||||
$VALGRIND bin/ctdb attach test1.tdb || exit 1
|
||||
$VALGRIND bin/ctdb attach test2.tdb || exit 1
|
||||
|
||||
echo "Testing getdbmap"
|
||||
$VALGRIND bin/ctdb getdbmap || exit 1
|
||||
|
||||
echo "Testing status"
|
||||
$VALGRIND bin/ctdb status || exit 1 # Done: implied
|
||||
|
||||
echo "Testing variables"
|
||||
$VALGRIND bin/ctdb listvars || exit 1
|
||||
$VALGRIND bin/ctdb getvar TraverseTimeout || exit 1 # Done
|
||||
$VALGRIND bin/ctdb setvar TraverseTimeout 10 || exit 1 # Done
|
||||
$VALGRIND bin/ctdb getvar TraverseTimeout || exit 1 # Done
|
||||
|
||||
sleep 1
|
||||
|
||||
echo "Testing shutdown"
|
||||
$VALGRIND bin/ctdb shutdown -n all || exit 1 # Done: implied by 09_ctdb_ping.sh
|
||||
|
||||
sleep 1
|
||||
|
||||
echo "All done"
|
||||
killall -q ctdbd
|
||||
exit 0
|
@ -1,3 +0,0 @@
|
||||
127.0.0.1
|
||||
127.0.0.2
|
||||
127.0.0.3
|
@ -1,4 +0,0 @@
|
||||
10.99.99.0/24
|
||||
10.99.99.1/24
|
||||
10.99.99.2/24
|
||||
10.99.99.3/24
|
@ -49,8 +49,8 @@ onnode 0 $CTDB_TEST_WRAPPER wait_until_node_has_status 1 disconnected
|
||||
try_command_on_node -v 0 '! ctdb ping -n 1'
|
||||
|
||||
sanity_check_output \
|
||||
2 \
|
||||
"(: ctdb_control error: 'ctdb_control to disconnected node'|Unable to get ping response from node 1)" \
|
||||
1 \
|
||||
"(: ctdb_control error: 'ctdb_control to disconnected node'|Unable to get ping response from node 1|Node 1 is DISCONNECTED)" \
|
||||
"$out"
|
||||
|
||||
echo "Expect a restart..."
|
||||
|
@ -38,24 +38,6 @@ EOF
|
||||
|
||||
ctdb_test_init "$@"
|
||||
|
||||
# Note that this doesn't work reliably over NFS!
|
||||
ctdb_trigger_recovered_file="/tmp/ctdb-trigger-recovered"
|
||||
|
||||
setup_recovered_trigger ()
|
||||
{
|
||||
onnode -q 0 touch "$ctdb_trigger_recovered_file"
|
||||
}
|
||||
|
||||
recovered_triggered ()
|
||||
{
|
||||
onnode -q 0 '! [ -e "$ctdb_trigger_recovered_file" ]'
|
||||
}
|
||||
|
||||
wait_until_recovered_triggered ()
|
||||
{
|
||||
wait_until 30 recovered_triggered
|
||||
}
|
||||
|
||||
########################################
|
||||
|
||||
set -e
|
||||
@ -78,12 +60,9 @@ done <<<"$out" # bashism to avoid problem setting variable in pipeline.
|
||||
|
||||
echo "Selected node ${test_node} with IPs: $ips"
|
||||
|
||||
setup_recovered_trigger
|
||||
|
||||
echo "Disabling node $test_node"
|
||||
try_command_on_node 1 ctdb disable -n $test_node
|
||||
|
||||
# Avoid a potential race condition...
|
||||
onnode 0 $CTDB_TEST_WRAPPER wait_until_node_has_status $test_node disabled
|
||||
|
||||
if wait_until_ips_are_on_nodeglob "[!${test_node}]" $ips ; then
|
||||
@ -107,11 +86,6 @@ else
|
||||
testfailures=1
|
||||
fi
|
||||
|
||||
# Disabling this because for some reason it is completely unreliable.
|
||||
# Depend even more on the sleep below...
|
||||
echo "Waiting until cluster has recovered..."
|
||||
wait_until_recovered_triggered
|
||||
|
||||
echo "All done!"
|
||||
|
||||
ctdb_test_exit
|
||||
|
Reference in New Issue
Block a user