mirror of
https://github.com/ceph/ceph
synced 2024-12-23 20:03:56 +00:00
qa: mds rename: Rework so it will function in teuthology as a workunit:
work in current directory, not hardcoded mnt path use CEPH_TOOL variable rather than hardcoded local executable pass CEPH_ARGS to scripts so you don't need to export it into the environment. Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
This commit is contained in:
parent
528b615112
commit
e483bb6b80
@ -2,26 +2,29 @@
|
||||
|
||||
dir=`dirname $0`
|
||||
|
||||
$dir/prepare.sh
|
||||
CEPH_TOOL='./ceph'
|
||||
$CEPH_TOOL || CEPH_TOOL='ceph'
|
||||
|
||||
$dir/pri_nul.sh
|
||||
rm mnt/?/* || true
|
||||
CEPH_ARGS=$CEPH_ARGS CEPH_TOOL=$CEPH_TOOL $dir/prepare.sh
|
||||
|
||||
$dir/rem_nul.sh
|
||||
rm mnt/?/* || true
|
||||
CEPH_ARGS=$CEPH_ARGS CEPH_TOOL=$CEPH_TOOL $dir/pri_nul.sh
|
||||
rm ./?/* || true
|
||||
|
||||
$dir/pri_pri.sh
|
||||
rm mnt/?/* || true
|
||||
CEPH_ARGS=$CEPH_ARGS CEPH_TOOL=$CEPH_TOOL $dir/rem_nul.sh
|
||||
rm ./?/* || true
|
||||
|
||||
$dir/rem_pri.sh
|
||||
rm mnt/?/* || true
|
||||
CEPH_ARGS=$CEPH_ARGS CEPH_TOOL=$CEPH_TOOL $dir/pri_pri.sh
|
||||
rm ./?/* || true
|
||||
|
||||
$dir/rem_rem.sh
|
||||
rm mnt/?/* || true
|
||||
CEPH_ARGS=$CEPH_ARGS CEPH_TOOL=$CEPH_TOOL $dir/rem_pri.sh
|
||||
rm ./?/* || true
|
||||
|
||||
$dir/pri_nul.sh
|
||||
rm -r mnt/?/* || true
|
||||
CEPH_ARGS=$CEPH_ARGS CEPH_TOOL=$CEPH_TOOL $dir/rem_rem.sh
|
||||
rm ./?/* || true
|
||||
|
||||
$dir/pri_pri.sh
|
||||
rm -r mnt/?/* || true
|
||||
CEPH_ARGS=$CEPH_ARGS CEPH_TOOL=$CEPH_TOOL $dir/pri_nul.sh
|
||||
rm -r ./?/* || true
|
||||
|
||||
CEPH_ARGS=$CEPH_ARGS CEPH_TOOL=$CEPH_TOOL $dir/pri_pri.sh
|
||||
rm -r ./?/* || true
|
||||
|
||||
|
@ -1,28 +1,28 @@
|
||||
#!/bin/sh -ex
|
||||
|
||||
# dir: srcdn=destdn
|
||||
mkdir mnt/a/dir1
|
||||
mv mnt/a/dir1 mnt/a/dir1.renamed
|
||||
mkdir ./a/dir1
|
||||
mv ./a/dir1 ./a/dir1.renamed
|
||||
|
||||
# dir: diff
|
||||
mkdir mnt/a/dir2
|
||||
mv mnt/a/dir2 mnt/b/dir2
|
||||
mkdir ./a/dir2
|
||||
mv ./a/dir2 ./b/dir2
|
||||
|
||||
# dir: diff, child subtree on target
|
||||
mkdir -p mnt/a/dir3/child/foo
|
||||
./ceph mds tell 0 export_dir /a/dir3/child 1
|
||||
mkdir -p ./a/dir3/child/foo
|
||||
$CEPH_TOOL mds tell 0 export_dir /a/dir3/child 1
|
||||
sleep 5
|
||||
mv mnt/a/dir3 mnt/b/dir3
|
||||
mv ./a/dir3 ./b/dir3
|
||||
|
||||
# dir: diff, child subtree on other
|
||||
mkdir -p mnt/a/dir4/child/foo
|
||||
./ceph mds tell 0 export_dir /a/dir4/child 2
|
||||
mkdir -p ./a/dir4/child/foo
|
||||
$CEPH_TOOL mds tell 0 export_dir /a/dir4/child 2
|
||||
sleep 5
|
||||
mv mnt/a/dir4 mnt/b/dir4
|
||||
mv ./a/dir4 ./b/dir4
|
||||
|
||||
# dir: witness subtree adjustment
|
||||
mkdir -p mnt/a/dir5/1/2/3/4
|
||||
./ceph mds tell 0 export_dir /a/dir5/1/2/3 2
|
||||
mkdir -p ./a/dir5/1/2/3/4
|
||||
$CEPH_TOOL mds tell 0 export_dir /a/dir5/1/2/3 2
|
||||
sleep 5
|
||||
mv mnt/a/dir5 mnt/b
|
||||
mv ./a/dir5 ./b
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
#!/bin/sh -ex
|
||||
|
||||
# dir, srcdn=destdn
|
||||
mkdir mnt/a/dir1
|
||||
mkdir mnt/a/dir2
|
||||
mv -T mnt/a/dir1 mnt/a/dir2
|
||||
mkdir ./a/dir1
|
||||
mkdir ./a/dir2
|
||||
mv -T ./a/dir1 ./a/dir2
|
||||
|
||||
# dir, different
|
||||
mkdir mnt/a/dir3
|
||||
mkdir mnt/b/dir4
|
||||
mv -T mnt/a/dir3 mnt/b/dir4
|
||||
mkdir ./a/dir3
|
||||
mkdir ./b/dir4
|
||||
mv -T ./a/dir3 ./b/dir4
|
||||
|
@ -1,18 +1,18 @@
|
||||
#!/bin/sh -ex
|
||||
|
||||
./ceph mds tell 0 injectargs '--mds-bal-interval 0'
|
||||
./ceph mds tell 1 injectargs '--mds-bal-interval 0'
|
||||
./ceph mds tell 2 injectargs '--mds-bal-interval 0'
|
||||
./ceph mds tell 3 injectargs '--mds-bal-interval 0'
|
||||
#./ceph mds tell 4 injectargs '--mds-bal-interval 0'
|
||||
$CEPH_TOOL mds tell 0 injectargs '--mds-bal-interval 0'
|
||||
$CEPH_TOOL mds tell 1 injectargs '--mds-bal-interval 0'
|
||||
$CEPH_TOOL mds tell 2 injectargs '--mds-bal-interval 0'
|
||||
$CEPH_TOOL mds tell 3 injectargs '--mds-bal-interval 0'
|
||||
#$CEPH_TOOL mds tell 4 injectargs '--mds-bal-interval 0'
|
||||
|
||||
mkdir -p mnt/a/a
|
||||
mkdir -p mnt/b/b
|
||||
mkdir -p mnt/c/c
|
||||
mkdir -p mnt/d/d
|
||||
mkdir -p ./a/a
|
||||
mkdir -p ./b/b
|
||||
mkdir -p ./c/c
|
||||
mkdir -p ./d/d
|
||||
|
||||
./ceph mds tell 0 export_dir /b 1
|
||||
./ceph mds tell 0 export_dir /c 2
|
||||
./ceph mds tell 0 export_dir /d 3
|
||||
$CEPH_TOOL mds tell 0 export_dir /b 1
|
||||
$CEPH_TOOL mds tell 0 export_dir /c 2
|
||||
$CEPH_TOOL mds tell 0 export_dir /d 3
|
||||
sleep 5
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
#!/bin/sh -ex
|
||||
|
||||
# srcdn=destdn
|
||||
touch mnt/a/file1
|
||||
mv mnt/a/file1 mnt/a/file1.renamed
|
||||
touch ./a/file1
|
||||
mv ./a/file1 ./a/file1.renamed
|
||||
|
||||
# different
|
||||
touch mnt/a/file2
|
||||
mv mnt/a/file2 mnt/b
|
||||
touch ./a/file2
|
||||
mv ./a/file2 ./b
|
||||
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
#!/bin/sh -ex
|
||||
|
||||
# srcdn=destdn
|
||||
touch mnt/a/file1
|
||||
touch mnt/a/file2
|
||||
mv mnt/a/file1 mnt/a/file2
|
||||
touch ./a/file1
|
||||
touch ./a/file2
|
||||
mv ./a/file1 ./a/file2
|
||||
|
||||
# different (srcdn != destdn)
|
||||
touch mnt/a/file3
|
||||
touch mnt/b/file4
|
||||
mv mnt/a/file3 mnt/b/file4
|
||||
touch ./a/file3
|
||||
touch ./b/file4
|
||||
mv ./a/file3 ./b/file4
|
||||
|
||||
|
@ -6,11 +6,11 @@ dotest() {
|
||||
destdn=$3
|
||||
n=$4
|
||||
|
||||
touch mnt/$src/src$n
|
||||
touch mnt/$desti/desti$n
|
||||
ln mnt/$desti/desti$n mnt/$destdn/destdn$n
|
||||
touch ./$src/src$n
|
||||
touch ./$desti/desti$n
|
||||
ln ./$desti/desti$n ./$destdn/destdn$n
|
||||
|
||||
mv mnt/$src/src$n mnt/$destdn/destdn$n
|
||||
mv ./$src/src$n ./$destdn/destdn$n
|
||||
}
|
||||
|
||||
|
||||
|
@ -6,10 +6,10 @@ dotest() {
|
||||
dest=$3
|
||||
n=$4
|
||||
|
||||
touch mnt/$srci/srci$n
|
||||
ln mnt/$srci/srci$n mnt/$srcdn/srcdn$n
|
||||
touch ./$srci/srci$n
|
||||
ln ./$srci/srci$n ./$srcdn/srcdn$n
|
||||
|
||||
mv mnt/$srcdn/srcdn$n mnt/$dest/dest$n
|
||||
mv ./$srcdn/srcdn$n ./$dest/dest$n
|
||||
}
|
||||
|
||||
# srci=srcdn=destdn
|
||||
|
@ -6,11 +6,11 @@ dotest() {
|
||||
dest=$3
|
||||
n=$4
|
||||
|
||||
touch mnt/$srci/srci$n
|
||||
ln mnt/$srci/srci$n mnt/$srcdn/srcdn$n
|
||||
touch mnt/$dest/dest$n
|
||||
touch ./$srci/srci$n
|
||||
ln ./$srci/srci$n ./$srcdn/srcdn$n
|
||||
touch ./$dest/dest$n
|
||||
|
||||
mv mnt/$srcdn/srcdn$n mnt/$dest/dest$n
|
||||
mv ./$srcdn/srcdn$n ./$dest/dest$n
|
||||
}
|
||||
|
||||
# srci=srcdn=destdn
|
||||
|
@ -7,12 +7,12 @@ dotest() {
|
||||
destdn=$4
|
||||
n=$5
|
||||
|
||||
touch mnt/$srci/srci$n
|
||||
ln mnt/$srci/srci$n mnt/$srcdn/srcdn$n
|
||||
touch mnt/$desti/desti$n
|
||||
ln mnt/$desti/desti$n mnt/$destdn/destdn$n
|
||||
touch ./$srci/srci$n
|
||||
ln ./$srci/srci$n ./$srcdn/srcdn$n
|
||||
touch ./$desti/desti$n
|
||||
ln ./$desti/desti$n ./$destdn/destdn$n
|
||||
|
||||
mv mnt/$srcdn/srcdn$n mnt/$destdn/destdn$n
|
||||
mv ./$srcdn/srcdn$n ./$destdn/destdn$n
|
||||
}
|
||||
|
||||
# srci=srcdn=destdn=desti
|
||||
|
Loading…
Reference in New Issue
Block a user