X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Frecovery-random-scale.sh;h=dc4c3ae0bdb5c786414dc3cb3f500e5d05c604cd;hb=9db2fa9133b15a99a1d5a04914964a015de32367;hp=0b88e9d0103c2d5ed9fb04b7827959aeed7b9dbe;hpb=9ca23c48a069b07c49cac3dfb725e94b3e634e65;p=fs%2Flustre-release.git diff --git a/lustre/tests/recovery-random-scale.sh b/lustre/tests/recovery-random-scale.sh index 0b88e9d..dc4c3ae 100644 --- a/lustre/tests/recovery-random-scale.sh +++ b/lustre/tests/recovery-random-scale.sh @@ -1,6 +1,5 @@ #!/bin/bash -# vim:shiftwidth=4:softtabstop=4:tabstop=4: - +# # client failure does not affect other clients # Start load on clients (each client works on it's own directory). @@ -14,15 +13,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_RANDOM_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 @@ -52,8 +52,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} @@ -110,8 +111,6 @@ Status: $result: rc=$rc" } ################################## Main Flow ################################### -build_test_filter - check_and_setup_lustre rm -rf $DIR/[Rdfs][0-9]*