diff options
author | Sage Weil <sage@newdream.net> | 2009-12-01 16:18:23 -0800 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2009-12-01 16:19:19 -0800 |
commit | defeedb545aa548c8f88830271bb775778026237 (patch) | |
tree | b7b73c80fb1092e6f99fd4a3885bea0df57c3b8c | |
parent | c280aace5325a5af7f05a54ad104fda0a84264ad (diff) | |
download | ceph-defeedb545aa548c8f88830271bb775778026237.tar.gz |
qa: test mdstable failures
-rwxr-xr-x | qa/client/30_subdir_mount.sh | 4 | ||||
-rw-r--r-- | qa/client/common.sh | 21 | ||||
-rw-r--r-- | qa/mds/test_mdstable_failures.sh | 12 |
3 files changed, 27 insertions, 10 deletions
diff --git a/qa/client/30_subdir_mount.sh b/qa/client/30_subdir_mount.sh index 03a8623b036..00f4f020e5d 100755 --- a/qa/client/30_subdir_mount.sh +++ b/qa/client/30_subdir_mount.sh @@ -3,10 +3,10 @@ basedir=`echo $0 | sed 's/[^/]*$//g'`. . $basedir/common.sh -mount +client_mount mkdir -p $mnt/sub echo sub > $mnt/sub/file -umount +client_umount mkdir -p $mnt/1 mkdir -p $mnt/2 diff --git a/qa/client/common.sh b/qa/client/common.sh index d032d26102e..d06368e6ea7 100644 --- a/qa/client/common.sh +++ b/qa/client/common.sh @@ -1,6 +1,6 @@ # defaults -[ -z "$bindir" ] && bindir="." # location of init-ceph +[ -z "$bindir" ] && bindir=$PWD # location of init-ceph [ -z "$conf" ] && conf="$basedir/ceph.conf" [ -z "$mnt" ] && mnt="/c" [ -z "$monhost" ] && monhost="cosd0" @@ -9,12 +9,12 @@ set -e mydir=`hostname`_`echo $0 | sed 's/\//_/g'` -mount() +client_mount() { /bin/mount -t ceph $monhost:/ $mnt } -umount() +client_umount() { /bin/umount $mnt # look for VFS complaints @@ -24,22 +24,27 @@ umount() fi } -start() +ceph_start() { $bindir/init-ceph -c $conf start ${1} } -stop() +ceph_stop() { $bindir/init-ceph -c $conf stop ${1} } -restart() +ceph_restart() { $bindir/init-ceph -c $conf restart ${1} } -enter_mydir() +ceph_command() +{ + $bindir/ceph -c $conf $* +} + +client_enter_mydir() { pushd . test -d $mnt/$mydir && rm -r $mnt/$mydir @@ -47,7 +52,7 @@ enter_mydir() cd $mnt/$mydir } -leave_mydir() +client_leave_mydir() { popd } diff --git a/qa/mds/test_mdstable_failures.sh b/qa/mds/test_mdstable_failures.sh new file mode 100644 index 00000000000..507395268f2 --- /dev/null +++ b/qa/mds/test_mdstable_failures.sh @@ -0,0 +1,12 @@ +#!/bin/bash -x + +for f in `seq 1 8` +do + echo testing failure point $f + $bindir/ceph -c $conf mds injectargs 0 "--mds_kill_mdstable_at $f" + sleep 1 # wait for mds command to go thru + pushd . ; cd $bindir ; ./init-ceph -c $conf start mds ; popd + touch $f + ln $f $f.link +done + |