From 69c7742fa74bbb9f7ee71cb0937b711817379af5 Mon Sep 17 00:00:00 2001 From: grev Date: Wed, 14 Oct 2009 22:03:34 +0000 Subject: [PATCH] b=20237 i=Robert.Read more tests gather logs changes --- lustre/tests/recovery-double-scale.sh | 17 +++++++++++++++-- lustre/tests/recovery-random-scale.sh | 18 ++++++++++++------ lustre/tests/test-framework.sh | 3 ++- 3 files changed, 29 insertions(+), 9 deletions(-) diff --git a/lustre/tests/recovery-double-scale.sh b/lustre/tests/recovery-double-scale.sh index 04ec0c4..a996a83 100644 --- a/lustre/tests/recovery-double-scale.sh +++ b/lustre/tests/recovery-double-scale.sh @@ -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 } diff --git a/lustre/tests/recovery-random-scale.sh b/lustre/tests/recovery-random-scale.sh index dfde69a..14f0768 100644 --- a/lustre/tests/recovery-random-scale.sh +++ b/lustre/tests/recovery-random-scale.sh @@ -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 } diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 4da98e7..ee7eecf 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -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 -- 1.8.3.1