From 2455dd4602ef5f211deb7eda5feb7aa0aa5d5b5b Mon Sep 17 00:00:00 2001 From: Keith Mannthey Date: Wed, 20 Mar 2013 16:10:51 -0700 Subject: [PATCH] LU-1897 test: replay-single test_70b dbench not found dbench is taking too long to start. It was observed that a 12 seconds sleep was not long enough to start dbench on all clients. I added a loop to rally all clients before starting the testing and improved the error messages. Signed-off-by: Keith Mannthey Change-Id: I7b0fce4c39c003c4db23686b295fb5e45a6f8a92 Reviewed-on: http://review.whamcloud.com/5761 Reviewed-by: Bob Glossman Reviewed-by: Jian Yu Tested-by: Hudson Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/tests/replay-single.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/lustre/tests/replay-single.sh b/lustre/tests/replay-single.sh index 6a3260f..1f9a43f 100755 --- a/lustre/tests/replay-single.sh +++ b/lustre/tests/replay-single.sh @@ -1892,6 +1892,7 @@ test_70b () { # set duration to 900 because it takes some time to boot node [ "$FAILURE_MODE" = HARD ] && duration=900 + local elapsed local start_ts=$(date +%s) local cmd="rundbench 1 -t $duration" local pid="" @@ -1900,15 +1901,24 @@ test_70b () { DBENCH_LIB=$DBENCH_LIB TESTSUITE=$TESTSUITE TESTNAME=$TESTNAME \ MOUNT=$MOUNT DIR=$DIR/$tdir/\\\$(hostname) LCTL=$LCTL $cmd" & pid=$! + + #LU-1897 wait for all dbench copies to start + while ! check_for_process $clients dbench; do + elapsed=$(($(date +%s) - start_ts)) + if [ $elapsed -gt $duration]; then + killall_process $clients dbench + error "dbench failed to start on $clients!" + fi + sleep 1 + done + log "Started rundbench load pid=$pid ..." - # give rundbench a chance to start, bug 24118 - sleep 12 - local elapsed=$(($(date +%s) - start_ts)) + elapsed=$(($(date +%s) - start_ts)) local num_failovers=0 while [ $elapsed -lt $duration ]; do if ! check_for_process $clients dbench; then - error_noexit "dbench not running on some of $clients!" + error_noexit "dbench stopped on some of $clients!" killall_process $clients dbench break fi -- 1.8.3.1