Whamcloud - gitweb
b=20237
authorgrev <grev>
Thu, 10 Dec 2009 12:40:19 +0000 (12:40 +0000)
committergrev <grev>
Thu, 10 Dec 2009 12:40:19 +0000 (12:40 +0000)
i=Robert.Read
more tests gather logs changes

lustre/tests/recovery-double-scale.sh
lustre/tests/recovery-random-scale.sh
lustre/tests/test-framework.sh

index 81757e2..1f84f92 100644 (file)
@@ -17,8 +17,11 @@ CLEANUP=${CLEANUP:-""}
 init_test_env $@
 
 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 init_test_env $@
 
 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
-TESTSUITELOG=${TESTSUITELOG:-$TMP/recovery-double-scale}
+TESTSUITELOG=${TESTSUITELOG:-$TMP/$(basename $0 .sh)}
 DEBUGLOG=$TESTSUITELOG.debug
 DEBUGLOG=$TESTSUITELOG.debug
+
+cleanup_logs
+
 exec 2>$DEBUGLOG
 echo "--- env ---" >&2
 env >&2
 exec 2>$DEBUGLOG
 echo "--- env ---" >&2
 env >&2
@@ -227,6 +230,16 @@ Status: $result: rc=$rc"
         sleep 5
         kill -9 $CLIENT_LOAD_PIDS || true
     fi
         sleep 5
         kill -9 $CLIENT_LOAD_PIDS || true
     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)
+        # FIXME: need ostfailover-s nodes also for FLAVOR=OST
+        local product=$(gather_logs $(comma_list $(osts_nodes) \
+                                 $(mdts_nodes) $mdsfailover_HOST $failedclients))
+        echo logs files $product
+    fi
+
     [ $rc -eq 0 ] && zconf_mount $(hostname) $MOUNT
     exit $rc
 }
     [ $rc -eq 0 ] && zconf_mount $(hostname) $MOUNT
     exit $rc
 }
index 878e594..2458aff 100644 (file)
@@ -19,8 +19,11 @@ init_test_env $@
 
 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 
 
 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 
-TESTSUITELOG=${TESTSUITELOG:-$TMP/recovery-random-scale}
+TESTSUITELOG=${TESTSUITELOG:-$TMP/$(basename $0 .sh)}
 DEBUGLOG=$TESTSUITELOG.debug
 DEBUGLOG=$TESTSUITELOG.debug
+
+cleanup_logs
+
 exec 2>$DEBUGLOG
 echo "--- env ---" >&2
 env >&2
 exec 2>$DEBUGLOG
 echo "--- env ---" >&2
 env >&2
@@ -155,13 +158,16 @@ Status: $result: rc=$rc"
 
     if [ $rc -ne 0 ]; then
         print_logs $NODES_TO_USE
 
     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) \
+                                 $(mdts_nodes) $mdsfailover_HOST $failedclients))
+        echo logs files $product
     fi
 
     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
 }
 
     exit $rc
 }
 
index 919d90f..42e51a1 100644 (file)
@@ -127,6 +127,7 @@ init_test_env() {
     if ! echo $PATH | grep -q $LUSTRE/tests/mpi; then
         export PATH=$PATH:$LUSTRE/tests/mpi
     fi
     if ! echo $PATH | grep -q $LUSTRE/tests/mpi; then
         export PATH=$PATH:$LUSTRE/tests/mpi
     fi
+    export RSYNC_RSH=${RSYNC_RSH:-rsh}
     export LCTL=${LCTL:-"$LUSTRE/utils/lctl"}
     [ ! -f "$LCTL" ] && export LCTL=$(which lctl)
     export LFS=${LFS:-"$LUSTRE/utils/lfs"}
     export LCTL=${LCTL:-"$LUSTRE/utils/lctl"}
     [ ! -f "$LCTL" ] && export LCTL=$(which lctl)
     export LFS=${LFS:-"$LUSTRE/utils/lfs"}
@@ -3346,7 +3347,7 @@ dmesg > \\\$log; "
         logs=$logs' '$tmp/'*'$ts'*'
     fi
     for node in ${list//,/ }; do
         logs=$logs' '$tmp/'*'$ts'*'
     fi
     for node in ${list//,/ }; do
-        rsync -az $node:"$logs" $TMP 
+        rsync -az $node:"$logs" $TMP
     done
 
     local archive=$TMP/${TESTSUITE}-$ts.tar.bz2
     done
 
     local archive=$TMP/${TESTSUITE}-$ts.tar.bz2