# 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"
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
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
cd $mnt/$mydir
}
-leave_mydir()
+client_leave_mydir()
{
popd
}
--- /dev/null
+#!/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
+