Whamcloud - gitweb
LU-1897 test: replay-single test_70b dbench not found
authorKeith Mannthey <keith.mannthey@intel.com>
Wed, 20 Mar 2013 23:10:51 +0000 (16:10 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 26 Mar 2013 05:43:06 +0000 (01:43 -0400)
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 <keith.mannthey@intel.com>
Change-Id: I7b0fce4c39c003c4db23686b295fb5e45a6f8a92
Reviewed-on: http://review.whamcloud.com/5761
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/replay-single.sh

index 6a3260f..1f9a43f 100755 (executable)
@@ -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