1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

Merge commit 'martins/master'

(This used to be ctdb commit b6bde176af69354ccfb00e6a3169f6b355a59d15)
This commit is contained in:
Ronnie Sahlberg 2009-11-13 12:25:31 +11:00
commit 2861bbdd5a
3 changed files with 11 additions and 9 deletions

View File

@ -52,6 +52,10 @@ cluster_is_healthy
# Reset configuration
ctdb_restart_when_done
ctdb_test_exit_hook_add ctdb_test_eventscript_uninstall
ctdb_test_eventscript_install
# We need this for later, so we know how long to sleep.
try_command_on_node 0 $CTDB getvar MonitorInterval
monitor_interval="${out#*= }"
@ -71,8 +75,7 @@ wait_until_get_src_socket "tcp" "${test_ip}:${test_port}" $nc_pid "nc"
src_socket="$out"
echo "Source socket is $src_socket"
echo "Sleeping for MonitorInterval..."
sleep_for $monitor_interval
wait_for_monitor_event $test_node
echo "Trying to determine NFS_TICKLE_SHARED_DIRECTORY..."
f="/etc/sysconfig/nfs"

View File

@ -70,11 +70,10 @@ wait_until_get_src_socket "tcp" "${test_ip}:${test_port}" $nc_pid "nc"
src_socket="$out"
echo "Source socket is $src_socket"
# Right here we assume that Samba is able to register the tickle with
# CTDB faster than it takes us to wait for netstat to register the
# connection and then use onnode below to ask CTDB about it.
try_command_on_node -v 0 ctdb gettickles $test_ip -n $test_node
# This should happen as soon as connection is up... but unless we wait
# we sometimes beat the registration.
echo "Checking if CIFS connection is tracked by CTDB..."
wait_until 10 try_command_on_node 0 ctdb gettickles $test_ip -n $test_node
if [ "${out/SRC: ${src_socket} /}" != "$out" ] ; then
echo "GOOD: CIFS connection tracked OK by CTDB."

View File

@ -297,8 +297,8 @@ wait_until ()
echo -n "<${timeout}|"
local t=$timeout
while [ $t -gt 0 ] ; do
("$@")
local rc=$?
local rc=0
"$@" || rc=$?
if { ! $negate && [ $rc -eq 0 ] ; } || \
{ $negate && [ $rc -ne 0 ] ; } ; then
echo "|$(($timeout - $t))|"