From 87700ab0047673e5f9323213ff7cbc1961890f33 Mon Sep 17 00:00:00 2001 From: shaver Date: Fri, 31 Jan 2003 19:06:33 +0000 Subject: [PATCH] - Clean up, but don't error out if some parts fail. - ONLY for easier controlled-reproduction. - Error codes count. --- lustre/tests/recovery-small.sh | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/lustre/tests/recovery-small.sh b/lustre/tests/recovery-small.sh index a9d20d1..b57b169 100755 --- a/lustre/tests/recovery-small.sh +++ b/lustre/tests/recovery-small.sh @@ -7,7 +7,7 @@ PATH=$PATH:$LUSTRE/utils:$LUSTRE/tests . $LUSTRE/../ltest/functional/llite/common/common.sh -PDSH='pdsh -w' +PDSH='pdsh -S -w' # XXX I wish all this stuff was in some default-config.sh somewhere MDSNODE=${MDSNODE:-dev2} @@ -22,15 +22,15 @@ MDSSIZE=100000 OSTSIZE=100000 do_mds() { - $PDSH $MDSNODE "PATH=\$PATH:$PATH; cd $PWD; $@" + $PDSH $MDSNODE "PATH=\$PATH:$LUSTRE/utils:$LUSTRE/tests; cd $PWD; $@" } do_client() { - $PDSH $CLIENT "PATH=\$PATH:$PATH; cd $PWD; $@" + $PDSH $CLIENT "PATH=\$PATH:$LUSTRE/utils:$LUSTRE/tests; cd $PWD; $@" } do_ost() { - $PDSH $OSTNODE "PATH=\$PATH:$PATH; cd $PWD; $@" + $PDSH $OSTNODE "PATH=\$PATH:$LUSTRE/utils:$LUSTRE/tests; cd $PWD; $@" } drop_request() { @@ -93,9 +93,9 @@ setup() { } cleanup() { - unmount_client - shutdown_mds - shutdown_ost + unmount_client || true + shutdown_mds || true + shutdown_ost || true } replay() { @@ -104,14 +104,20 @@ replay() { shift fi do_mds "sync" - echo -e 'device $mds1\nreadonly' | do_mds "lctl" + do_mds 'echo -e "device \$mds1\\nprobe\\nnotransno\\nreadonly" | lctl' do_client "$1" & shutdown_mds -f start_mds wait } +if [ ! -z "$ONLY" ]; then + eval "$ONLY" + exit $? +fi + setup drop_request "mcreate /mnt/lustre/1" drop_reply "mcreate /mnt/lustre/2" replay "mcreate /mnt/lustre/3" +cleanup -- 1.8.3.1