X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Frecovery-random-scale.sh;h=384c82b4836c5f4250935e4b5303c41e63acd938;hb=1e4cc6b12d7aa5266597540590a2a182edb41289;hp=061a2b9b83bd2e27019d4dfbfaf66dc31559c344;hpb=0f391e372b759b0f7dac6c924da1b8944532cc62;p=fs%2Flustre-release.git diff --git a/lustre/tests/recovery-random-scale.sh b/lustre/tests/recovery-random-scale.sh index 061a2b9..384c82b 100644 --- a/lustre/tests/recovery-random-scale.sh +++ b/lustre/tests/recovery-random-scale.sh @@ -19,8 +19,11 @@ init_test_env $@ . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh} -TESTSUITELOG=${TESTSUITELOG:-$TMP/recovery-random-scale} +TESTSUITELOG=${TESTSUITELOG:-$TMP/$(basename $0 .sh)} DEBUGLOG=$TESTSUITELOG.debug + +cleanup_logs + exec 2>$DEBUGLOG echo "--- env ---" >&2 env >&2 @@ -112,7 +115,7 @@ summary_and_cleanup () { # actually failed though. the first node in the END_RUN_NODE is # the one we are really interested in. if [ -n "$END_RUN_NODE" ]; then - var=${END_RUN_NODE}_load + var=$(client_var_name $END_RUN_NODE)_load echo "Client load failed on node $END_RUN_NODE" echo echo "client $END_RUN_NODE load stdout and debug files : @@ -155,13 +158,16 @@ Status: $result: rc=$rc" if [ $rc -ne 0 ]; then print_logs $NODES_TO_USE + # 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 + local product=$(gather_logs $(comma_list $(osts_nodes) \ + $mds_HOST $mdsfailover_HOST $failedclients)) + echo logs files $product fi - if [ $rc -eq 0 ]; then - zconf_mount $(hostname) $MOUNT - else - error "exited with rc=$rc" - fi + [ $rc -eq 0 ] && zconf_mount $(hostname) $MOUNT + exit $rc } @@ -294,6 +300,10 @@ Failed to meet interval $reqfail times ( REQFAIL=$REQFAIL ); have sleep=$sleep" log " Number of failovers: $(numfailovers) and counting..." + if [ $((ELAPSED + sleep)) -gt $DURATION ]; then + break + fi + if [ $sleep -gt 0 ]; then echo "sleeping $sleep seconds ... " sleep $sleep