summaryrefslogtreecommitdiffstats
path: root/ctdb/tests/eventscripts/60.nfs.monitor.152.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ctdb/tests/eventscripts/60.nfs.monitor.152.sh')
-rwxr-xr-xctdb/tests/eventscripts/60.nfs.monitor.152.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/ctdb/tests/eventscripts/60.nfs.monitor.152.sh b/ctdb/tests/eventscripts/60.nfs.monitor.152.sh
new file mode 100755
index 00000000000..c4eb4194ae2
--- /dev/null
+++ b/ctdb/tests/eventscripts/60.nfs.monitor.152.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+. "${TEST_SCRIPTS_DIR}/unit.sh"
+
+define_test "mountd down, 10 iterations"
+
+# This simulates an ongoing failure in the eventscript's automated
+# attempts to restart the service. That is, the eventscript is unable
+# to restart the service.
+
+setup_nfs
+rpc_services_down "mountd"
+
+iterate_test 10 "ok_null" \
+ 5 "rpc_set_service_failure_response 'mountd'" \
+ 10 "rpc_set_service_failure_response 'mountd'"
+
+#export FAKE_NETSTAT_TCP_ESTABLISHED="10.0.0.1:2049|10.254.254.1:12301 10.0.0.1:2049|10.254.254.1:12302 10.0.0.1:2049|10.254.254.1:12303 10.0.0.1:2049|10.254.254.2:12304 10.0.0.1:2049|10.254.254.2:12305"