X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Flarge-scale.sh;h=ccfa0c180edfb4a8585cb29666bb17556b1547e8;hb=fdd5596593050d22feef05ecba6ba53c65cb3397;hp=6792612efe2573bf25114b9583a5fc9fb5ecca2f;hpb=5d37670e8507563db556879041c7992936aefa56;p=fs%2Flustre-release.git diff --git a/lustre/tests/large-scale.sh b/lustre/tests/large-scale.sh index 6792612..ccfa0c1 100644 --- a/lustre/tests/large-scale.sh +++ b/lustre/tests/large-scale.sh @@ -21,9 +21,9 @@ init_logging remote_mds_nodsh && log "SKIP: remote MDS with nodsh" && exit 0 -[ -n "$CLIENTS" ] || { skip_env "$0: Need two or more clients" && exit 0; } -[ $CLIENTCOUNT -ge 2 ] || \ - { skip_env "$0: Need two or more remote clients, have $CLIENTCOUNT" && exit 0; } +[ -z "$CLIENTS" ] && skip_env "$TESTSUITE: Need two or more clients" && exit 0 +[ $CLIENTCOUNT -lt 2 ] && + skip_env "$TESTSUITE: Need 2+ clients, have only $CLIENTCOUNT" && exit 0 # [ "$SLOW" = "no" ] && EXCEPT_SLOW="" @@ -49,7 +49,7 @@ test_3a() { # a half of clients by default increment=${INCREMENT:-$(( CLIENTCOUNT / 2 ))} - machinefile=${MACHINEFILE:-$TMP/$(basename $0 .sh).machines} + machinefile=${MACHINEFILE:-$TMP/$TESTSUITE.machines} local LOG=$TMP/${TESTSUITE}_$tfile local var=${SINGLEMDS}_svc @@ -71,42 +71,46 @@ test_3a() { local num=$increment - while [ $num -le $CLIENTCOUNT ]; do - list=$(comma_list ${nodes[@]:0:$num}) + while [ $num -le $CLIENTCOUNT ]; do + list=$(comma_list ${nodes[@]:0:$num}) - generate_machine_file $list $machinefile || - { error "can not generate machinefile"; exit 1; } + generate_machine_file $list $machinefile || + { error "can not generate machinefile"; exit 1; } - for i in $(seq $iters); do - mdsrate_cleanup $num $machinefile $nfiles $dir 'f%%d' --ignore + for i in $(seq $iters); do + mdsrate_cleanup $num $machinefile $nfiles $dir 'f%%d' \ + --ignore - COMMAND="${MDSRATE} --create --nfiles $nfiles --dir $dir --filefmt 'f%%d'" - mpi_run -np $((num * nthreads)) -machinefile $machinefile ${COMMAND} | tee ${LOG} & + COMMAND="${MDSRATE} --create --nfiles $nfiles --dir + $dir --filefmt 'f%%d'" + mpi_run ${MACHINEFILE_OPTION} $machinefile \ + -np $((num * nthreads)) ${COMMAND} | tee ${LOG}& - pid=$! - echo "pid=$pid" + pid=$! + echo "pid=$pid" - # 2 threads 100000 creates 117 secs - sleep 20 + # 2 threads 100000 creates 117 secs + sleep 20 - log "$i : Starting failover on $SINGLEMDS" - facet_failover $SINGLEMDS - if ! wait_recovery_complete $SINGLEMDS $((TIMEOUT * 10)); then - echo "$SINGLEMDS recovery is not completed!" - kill -9 $pid - exit 7 - fi + log "$i : Starting failover on $SINGLEMDS" + facet_failover $SINGLEMDS + if ! wait_recovery_complete $SINGLEMDS \ + $((TIMEOUT * 10)); then + echo "$SINGLEMDS recovery is not completed!" + kill -9 $pid + exit 7 + fi - duration=$(do_facet $SINGLEMDS lctl get_param -n $procfile | grep recovery_duration) - - res=( "${res[@]}" "$num" ) - res=( "${res[@]}" "$duration" ) - echo "RECOVERY TIME: NFILES=$nfiles number of clients: $num $duration" - wait $pid + duration=$(do_facet $SINGLEMDS lctl get_param -n \ + $procfile | grep recovery_duration) - done - num=$((num + increment)) - done + res=( "${res[@]}" "$num" ) + res=( "${res[@]}" "$duration" ) + echo "RECOVERY TIME: NFILES=$nfiles number of clients: $num $duration" + wait $pid + done + num=$((num + increment)) + done mdsrate_cleanup $num $machinefile $nfiles $dir 'f%%d' --ignore @@ -119,6 +123,6 @@ test_3a() { run_test 3a "recovery time, $CLIENTCOUNT clients" -complete $(basename $0) $SECONDS +complete $SECONDS check_and_cleanup_lustre exit_status