diff options
-rwxr-xr-x | ctdb/tests/eventscripts/60.ganesha.monitor.101.sh | 11 | ||||
-rwxr-xr-x | ctdb/tests/eventscripts/60.ganesha.monitor.131.sh | 17 | ||||
-rwxr-xr-x | ctdb/tests/eventscripts/60.ganesha.monitor.141.sh | 39 | ||||
-rw-r--r-- | ctdb/tests/eventscripts/scripts/local.sh | 14 |
4 files changed, 81 insertions, 0 deletions
diff --git a/ctdb/tests/eventscripts/60.ganesha.monitor.101.sh b/ctdb/tests/eventscripts/60.ganesha.monitor.101.sh new file mode 100755 index 00000000000..d68ad6a4a2f --- /dev/null +++ b/ctdb/tests/eventscripts/60.ganesha.monitor.101.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +. "${TEST_SCRIPTS_DIR}/unit.sh" + +define_test "all services available" + +setup_nfs_ganesha + +ok_null + +simple_test diff --git a/ctdb/tests/eventscripts/60.ganesha.monitor.131.sh b/ctdb/tests/eventscripts/60.ganesha.monitor.131.sh new file mode 100755 index 00000000000..95ce450e79f --- /dev/null +++ b/ctdb/tests/eventscripts/60.ganesha.monitor.131.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +. "${TEST_SCRIPTS_DIR}/unit.sh" + +define_test "rquotad down" + +setup_nfs_ganesha +rpc_services_down "rquotad" + +ok<<EOF +ERROR: rquotad failed RPC check: +rpcinfo: RPC: Program not registered +program rquotad version 1 is not available +Trying to restart rquotad [rpc.rquotad] +EOF + +simple_test diff --git a/ctdb/tests/eventscripts/60.ganesha.monitor.141.sh b/ctdb/tests/eventscripts/60.ganesha.monitor.141.sh new file mode 100755 index 00000000000..656a5307289 --- /dev/null +++ b/ctdb/tests/eventscripts/60.ganesha.monitor.141.sh @@ -0,0 +1,39 @@ +#!/bin/sh + +. "${TEST_SCRIPTS_DIR}/unit.sh" + +define_test "statd down, 6 iterations" + +# statd fails and attempts to restart it fail. + +setup_nfs_ganesha +rpc_services_down "status" + +ok_null +simple_test || exit $? + +ok<<EOF +Trying to restart statd [rpc.statd -n cluster1 -H /etc/ctdb/statd-callout ] +EOF +simple_test || exit $? + +ok_null +simple_test || exit $? + +ok<<EOF +ERROR: status failed RPC check: +rpcinfo: RPC: Program not registered +program status version 1 is not available +Trying to restart statd [rpc.statd -n cluster1 -H /etc/ctdb/statd-callout ] +EOF +simple_test || exit $? + +ok_null +simple_test || exit $? + +required_result 1 <<EOF +ERROR: status failed RPC check: +rpcinfo: RPC: Program not registered +program status version 1 is not available +EOF +simple_test || exit $? diff --git a/ctdb/tests/eventscripts/scripts/local.sh b/ctdb/tests/eventscripts/scripts/local.sh index 20988ae4ec6..6d1d52763a3 100644 --- a/ctdb/tests/eventscripts/scripts/local.sh +++ b/ctdb/tests/eventscripts/scripts/local.sh @@ -591,6 +591,20 @@ setup_nfs () fi } +setup_nfs_ganesha () +{ + setup_nfs "$@" + export NFS_SERVER_MODE="ganesha" + if [ "$1" != "down" ] ; then + export CTDB_MANAGES_NFS="yes" + fi + + # We do not support testing the Ganesha-nfsd-specific part of the + # eventscript. + export CTDB_SKIP_GANESHA_NFSD_CHECK="yes" + export CTDB_NFS_SKIP_SHARE_CHECK="yes" +} + rpc_services_down () { for _i ; do |