+ if [ $sleep -gt 0 ]; then
+ echo "sleeping $sleep seconds... "
+ sleep $sleep
+ fi
+ done
+ exit 0
+}
+
+################################## Main Flow ###################################
+build_test_filter
+
+check_and_setup_lustre
+rm -rf $DIR/[Rdfs][0-9]*
+
+MAX_RECOV_TIME=$(max_recovery_time)
+
+# The test node needs to be insulated from a lustre failure as much as possible,
+# so not even loading the lustre modules is ideal.
+# -- umount lustre
+# -- remove hostname from clients list
+zconf_umount $HOSTNAME $MOUNT
+NODES_TO_USE=${NODES_TO_USE:-$CLIENTS}
+NODES_TO_USE=$(exclude_items_from_list $NODES_TO_USE $HOSTNAME)
+
+check_progs_installed $NODES_TO_USE ${CLIENT_LOADS[@]}
+
+MDTS=$(get_facets MDS)
+OSTS=$(get_facets OST)
+
+test_failover_mds() {
+ # failover a random MDS
+ failover_target MDS
+}
+run_test failover_mds "failover MDS"
+
+test_failover_ost() {
+ # failover a random OST
+ failover_target OST
+}
+run_test failover_ost "failover OST"
+
+zconf_mount $HOSTNAME $MOUNT || error "mount $MOUNT on $HOSTNAME failed"
+client_up || error "start client on $HOSTNAME failed"