Whamcloud - gitweb
b=20237
authorgrev <grev>
Wed, 14 Oct 2009 22:03:34 +0000 (22:03 +0000)
committergrev <grev>
Wed, 14 Oct 2009 22:03:34 +0000 (22:03 +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 04ec0c4..a996a83 100644 (file)
@@ -17,8 +17,11 @@ CLEANUP=${CLEANUP:-""}
 init_test_env $@
 
 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
-TESTSUITELOG=${TESTSUITELOG:-$TMP/recovery-double-scale}
+TESTSUITELOG=${TESTSUITELOG:-$TMP/$(basename $0 .sh)}
 DEBUGLOG=$TESTSUITELOG.debug
+
+cleanup_logs
+
 exec 2>$DEBUGLOG
 echo "--- env ---" >&2
 env >&2
@@ -77,7 +80,7 @@ reboot_recover_node () {
                       boot_node $c
                       echo "Reintegrating $c"
                       # one client fails; need dk logs from this client only 
-                      zconf_mount $c $MOUNT || NODES="$c $(mdts_nodes) $(osts_nodes)" error_exit "zconf_mount failed"
+                      zconf_mount $c $MOUNT || NODES="$c $(facet_host mds) $(osts_nodes)" error_exit "zconf_mount failed"
                  done
                  start_client_loads $item
                  ;;
@@ -227,6 +230,16 @@ Status: $result: rc=$rc"
         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) \
+                                 $mds_HOST $mdsfailover_HOST $failedclients))
+        echo logs files $product
+    fi
+
     [ $rc -eq 0 ] && zconf_mount $(hostname) $MOUNT
     exit $rc
 }
index dfde69a..14f0768 100644 (file)
@@ -19,8 +19,11 @@ init_test_env $@
 
 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 
-TESTSUITELOG=${TESTSUITELOG:-$TMP/recovery-random-scale}
+TESTSUITELOG=${TESTSUITELOG:-$TMP/$(basename $0 .sh)}
 DEBUGLOG=$TESTSUITELOG.debug
+
+cleanup_logs
+
 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
+        # 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) \
+                                 $mds_HOST $mdsfailover_HOST $failedclients))
+        echo logs files $product
     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
 }
 
index 4da98e7..ee7eecf 100644 (file)
@@ -108,6 +108,7 @@ init_test_env() {
     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"}
     export LFS=${LFS:-"$LUSTRE/utils/lfs"}
     [ ! -f "$LCTL" ] && export LCTL=$(which lctl)
@@ -2757,7 +2758,7 @@ dmesg > \\\$log; "
         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