X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Ftests%2Frecovery-mds-scale.sh;h=134f2857a336543bdade59099f47897095380925;hp=fb6816b79e6ac4b5d8ab2346bf32bc4dd3d77bf6;hb=5290c48735290a0920d804daa7f428bb0df655c2;hpb=dee5f24114531ec34fc56ce2826ada9e5690aabc diff --git a/lustre/tests/recovery-mds-scale.sh b/lustre/tests/recovery-mds-scale.sh index fb6816b..134f285 100644 --- a/lustre/tests/recovery-mds-scale.sh +++ b/lustre/tests/recovery-mds-scale.sh @@ -1,6 +1,5 @@ #!/bin/bash -# vim:shiftwidth=4:softtabstop=4:tabstop=4: - +# # Was Test 11 in cmd3. # For duration of 24 hours repeatedly failover a random MDS at # 10 minute intervals and verify that no application errors occur. @@ -10,15 +9,16 @@ set -e ONLY=${ONLY:-"$*"} +LUSTRE=${LUSTRE:-$(dirname $0)/..} +. $LUSTRE/tests/test-framework.sh +init_test_env $@ +init_logging + # bug number for skipped test: ALWAYS_EXCEPT="$RECOVERY_MDS_SCALE_EXCEPT" # UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT! -LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)} -. $LUSTRE/tests/test-framework.sh -init_test_env $@ -. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh} -init_logging +build_test_filter remote_mds_nodsh && skip_env "remote MDS with nodsh" && exit 0 remote_ost_nodsh && skip_env "remote OST with nodsh" && exit 0 @@ -43,8 +43,9 @@ SERVER_FAILOVER_PERIOD=${SERVER_FAILOVER_PERIOD:-$((60 * 10))} # 10 minutes MINSLEEP=${MINSLEEP:-120} REQFAIL_PERCENT=${REQFAIL_PERCENT:-3} # bug17839 comment 62 -REQFAIL=${REQFAIL:-$((DURATION / SERVER_FAILOVER_PERIOD * - REQFAIL_PERCENT / 100))} +# round up the result of integer division: C=(A + (B - 1)) / B +REQFAIL=${REQFAIL:-$(((DURATION * REQFAIL_PERCENT + (SERVER_FAILOVER_PERIOD * + 100 - 1 )) / SERVER_FAILOVER_PERIOD / 100))} END_RUN_FILE=${END_RUN_FILE:-$SHARED_DIRECTORY/end_run_file} LOAD_PID_FILE=${LOAD_PID_FILE:-$TMP/client-load.pid} @@ -96,13 +97,11 @@ Status: $result: rc=$rc" # stop the client loads stop_client_loads $NODES_TO_USE $LOAD_PID_FILE - if [ $rc -ne 0 ]; then - # we are interested in only on failed clients and servers - local failedclients=$(cat $END_RUN_FILE | grep -v $0) - # FIXME: need ostfailover-s nodes also for FLAVOR=OST - gather_logs $(comma_list $(osts_nodes) $(mdts_nodes) \ - $mdsfailover_HOST $failedclients) - fi + if [ $rc -ne 0 ]; then + # we are interested in only on failed clients and servers + local failedclients=$(cat $END_RUN_FILE | grep -v $0) + gather_logs $(comma_list $(all_server_nodes) $failedclients) + fi exit $rc } @@ -212,8 +211,6 @@ bug 20918" } ################################## Main Flow ################################### -build_test_filter - check_and_setup_lustre rm -rf $DIR/[Rdfs][0-9]*