]> git.proxmox.com Git - ceph.git/blame - ceph/qa/client/common.sh
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / qa / client / common.sh
CommitLineData
7c673cae
FG
1
2# defaults
3[ -z "$bindir" ] && bindir=$PWD # location of init-ceph
4[ -z "$conf" ] && conf="$basedir/ceph.conf"
5[ -z "$mnt" ] && mnt="/c"
6[ -z "$monhost" ] && monhost="cosd0"
7
8set -e
9
10mydir=`hostname`_`echo $0 | sed 's/\//_/g'`
11
12client_mount()
13{
14 /bin/mount -t ceph $monhost:/ $mnt
15}
16
17client_umount()
18{
19 /bin/umount $mnt
20 # look for VFS complaints
21 if dmesg | tail -n 50 | grep -c "VFS: Busy inodes" ; then
22 echo "looks like we left inodes pinned"
23 exit 1
24 fi
25}
26
27ceph_start()
28{
29 $bindir/init-ceph -c $conf start ${1}
30}
31
32ceph_stop()
33{
34 $bindir/init-ceph -c $conf stop ${1}
35}
36
37ceph_restart()
38{
39 $bindir/init-ceph -c $conf restart ${1}
40}
41
42ceph_command()
43{
44 $bindir/ceph -c $conf $*
45}
46
47client_enter_mydir()
48{
49 pushd .
50 test -d $mnt/$mydir && rm -r $mnt/$mydir
51 mkdir $mnt/$mydir
52 cd $mnt/$mydir
53}
54
55client_leave_mydir()
56{
57 popd
58}