Test suite: complex/31_nfs_tickle.sh should use NFS_TICKLE_SHARED_DIRECTORY.
authorMartin Schwenke <martin@meltin.net>
Thu, 30 Jul 2009 03:57:40 +0000 (13:57 +1000)
committerMartin Schwenke <martin@meltin.net>
Thu, 30 Jul 2009 03:57:40 +0000 (13:57 +1000)
Rather than hardcoding the location of the shared tickle directory,
attempt to use the value of NFS_TICKLE_SHARED_DIRECTORY from
/etc/sysconfig/nfs on node 0.

Signed-off-by: Martin Schwenke <martin@meltin.net>
tests/complex/31_nfs_tickle.sh

index 45734cc7cdbecfdc9d1bedca97452de46b065fb1..18df17bf97afc0e0d372f00160d3e8ed4332cb04 100755 (executable)
@@ -74,10 +74,15 @@ echo "Source socket is $src_socket"
 echo "Sleeping for MonitorInterval..."
 sleep_for $monitor_interval
 
+echo "Trying to determine NFS_TICKLE_SHARED_DIRECTORY..."
+try_command_on_node 0 "sed -n -e s@^NFS_TICKLE_SHARED_DIRECTORY=@@p /etc/sysconfig/nfs" || true
+
+nfs_tickle_shared_directory="${out:-/gpfs/.ctdb/nfs-tickles}"
+
 try_command_on_node $test_node hostname
 test_hostname=$out
 
-try_command_on_node -v 0 cat /gpfs/.ctdb/nfs-tickles/$test_hostname/$test_ip
+try_command_on_node -v 0 cat "${nfs_tickle_shared_directory}/$test_hostname/$test_ip"
 
 if [ "${out/${src_socket}/}" != "$out" ] ; then
     echo "GOOD: NFS connection tracked OK in tickles file."