summaryrefslogtreecommitdiffstats
path: root/ctdb/tests/complex
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2010-08-26 15:28:19 +1000
committerMartin Schwenke <martin@meltin.net>2010-08-26 15:28:19 +1000
commit9235dc727a37a23bc35054d9130f16d48827b369 (patch)
tree840cd5603a070cae46e93d7affe5cb60c3119e4a /ctdb/tests/complex
parenta104d1d8237979ae9fc5dd332e6624c0392be1d0 (diff)
downloadsamba-9235dc727a37a23bc35054d9130f16d48827b369.tar.gz
samba-9235dc727a37a23bc35054d9130f16d48827b369.tar.xz
samba-9235dc727a37a23bc35054d9130f16d48827b369.zip
Test suite: NFS tickle test uses gettickles if events.d/61.nfstickle missing.
Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 4763ccbfeaedd0fd953dbeda17ef9af41386688b)
Diffstat (limited to 'ctdb/tests/complex')
-rwxr-xr-xctdb/tests/complex/31_nfs_tickle.sh18
1 files changed, 11 insertions, 7 deletions
diff --git a/ctdb/tests/complex/31_nfs_tickle.sh b/ctdb/tests/complex/31_nfs_tickle.sh
index eb6644b63f..53be7b6604 100755
--- a/ctdb/tests/complex/31_nfs_tickle.sh
+++ b/ctdb/tests/complex/31_nfs_tickle.sh
@@ -77,16 +77,20 @@ echo "Source socket is $src_socket"
wait_for_monitor_event $test_node
-echo "Trying to determine NFS_TICKLE_SHARED_DIRECTORY..."
-f="/etc/sysconfig/nfs"
-try_command_on_node -v 0 "[ -r $f ] && sed -n -e s@^NFS_TICKLE_SHARED_DIRECTORY=@@p $f" || true
+if try_command_on_node 0 "test -r /etc/ctdb/events.d/61.nfstickle" ; then
+ echo "Trying to determine NFS_TICKLE_SHARED_DIRECTORY..."
+ f="/etc/sysconfig/nfs"
+ try_command_on_node -v 0 "[ -r $f ] && sed -n -e s@^NFS_TICKLE_SHARED_DIRECTORY=@@p $f" || true
-nfs_tickle_shared_directory="${out:-/gpfs/.ctdb/nfs-tickles}"
+ nfs_tickle_shared_directory="${out:-/gpfs/.ctdb/nfs-tickles}"
-try_command_on_node $test_node hostname
-test_hostname=$out
+ try_command_on_node $test_node hostname
+ test_hostname=$out
-try_command_on_node -v 0 cat "${nfs_tickle_shared_directory}/$test_hostname/$test_ip"
+ try_command_on_node -v 0 cat "${nfs_tickle_shared_directory}/$test_hostname/$test_ip"
+else
+ try_command_on_node -v 0 "ctdb -Y gettickles $testip" "$testport"
+fi
if [ "${out/${src_socket}/}" != "$out" ] ; then
echo "GOOD: NFS connection tracked OK in tickles file."