X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Frecovery-mds-scale.sh;h=a58b97acaae65837ae824be5e24dd0f841252335;hb=734d944d98f4cbcaeebc462e979624e8bdfb7711;hp=ba3b5e6d8b98bfac7d52bad4f64e4f8b7f37baca;hpb=5d37670e8507563db556879041c7992936aefa56;p=fs%2Flustre-release.git diff --git a/lustre/tests/recovery-mds-scale.sh b/lustre/tests/recovery-mds-scale.sh index ba3b5e6..a58b97a 100644 --- a/lustre/tests/recovery-mds-scale.sh +++ b/lustre/tests/recovery-mds-scale.sh @@ -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 } @@ -247,6 +246,6 @@ run_test failover_ost "failover OST" zconf_mount $HOSTNAME $MOUNT || error "mount $MOUNT on $HOSTNAME failed" client_up || error "start client on $HOSTNAME failed" -complete $(basename $0) $SECONDS +complete $SECONDS check_and_cleanup_lustre exit_status