]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: update snaps workunits for allow_new_snaps flag
authorGreg Farnum <greg@inktank.com>
Wed, 25 Sep 2013 23:02:02 +0000 (16:02 -0700)
committerLoic Dachary <loic@dachary.org>
Thu, 26 Sep 2013 16:27:52 +0000 (18:27 +0200)
Test that it works in snaptest-0.sh, and set the flag in
all the snap workunits so they continue to function.

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Loic Dachary <loic@dachary.org>
17 files changed:
qa/workunits/snaps/snap-rm-diff.sh
qa/workunits/snaps/snaptest-0.sh
qa/workunits/snaps/snaptest-1.sh
qa/workunits/snaps/snaptest-2.sh
qa/workunits/snaps/snaptest-authwb.sh
qa/workunits/snaps/snaptest-capwb.sh
qa/workunits/snaps/snaptest-dir-rename.sh
qa/workunits/snaps/snaptest-double-null.sh
qa/workunits/snaps/snaptest-estale.sh
qa/workunits/snaps/snaptest-git-ceph.sh
qa/workunits/snaps/snaptest-intodir.sh
qa/workunits/snaps/snaptest-multiple-capsnaps.sh
qa/workunits/snaps/snaptest-parents.sh
qa/workunits/snaps/snaptest-snap-rm-cmp.sh
qa/workunits/snaps/snaptest-upchildrealms.sh
qa/workunits/snaps/snaptest-xattrwb.sh
qa/workunits/snaps/untar_snap_rm.sh

index 8dff54f58b8b905cb9711636425d7ffcac89f30f..3d30dc7937a57c2a2ee4c3dae2cdbe616ff80161 100755 (executable)
@@ -1,5 +1,6 @@
 #!/bin/sh -ex
 
+ceph mds set allow_new_snaps --yes-i-really-mean-it
 wget -q http://ceph.com/qa/linux-2.6.33.tar.bz2
 mkdir foo
 cp linux* foo
index 93e747af7dd072d29ba42b517721467262db4824..366249e7d2540862ceca7e9177c90f663e6932f5 100755 (executable)
@@ -1,7 +1,16 @@
 #!/bin/sh -x
 
+expect_failure() { 
+    if [ `"$@"` -e 0 ]; then
+       return 1
+    fi
+    return 0
+}
 set -e
 
+expect_failure mkdir .snap/foo
+ceph mds set allow_new_snaps --yes-i-really-mean-it
+
 echo asdf > foo
 mkdir .snap/foo
 grep asdf .snap/foo/foo
@@ -14,4 +23,7 @@ grep asdf .snap/bar/bar
 rmdir .snap/bar
 rm foo
 
+ceph mds unset allow_new_snaps --yes-i-really-mean-it
+expect_failure mkdir .snap/baz
+
 echo OK
\ No newline at end of file
index 59d41ef688f4b86f2f5b860e79b5a6329ae49b1e..7c528dd432a08d89bacce0d7ed85b480cd263371 100755 (executable)
@@ -2,6 +2,8 @@
 
 set -e
 
+ceph mds set allow_new_snaps --yes-i-really-mean-it
+
 echo 1 > file1
 echo 2 > file2
 echo 3 > file3
index 4b67999921c998bbc8b6c99a04162c15bd6b9709..b73bf9cb97f2454678ab1a670349697d3960a072 100755 (executable)
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+ceph mds set allow_new_snaps --yes-i-really-mean-it
+
 echo "Create dir 100 to 199 ..."
 for i in $(seq 100 199); do
        echo "    create dir $i"
index 128efb70d19ce6a03cf6acdc61c5d8d10ae1653b..acbb599bda97d5b6ac00352177874614e566fed8 100755 (executable)
@@ -2,6 +2,8 @@
 
 set -e
 
+ceph mds set allow_new_snaps --yes-i-really-mean-it
+
 touch foo
 chmod +x foo
 mkdir .snap/s
index 8c5a1333b69131c66951a8c38095712b8d5898ea..9d0568cb6dbe1e57a28ada0267284cfea2a73c24 100755 (executable)
@@ -4,6 +4,8 @@ set -e
 
 mkdir foo
 
+ceph mds set allow_new_snaps --yes-i-really-mean-it
+
 # make sure mds handles it when the client does not send flushsnap
 echo x > foo/x
 sync
index e81edf9c47f597603a19567510454dabbfd0e62c..6995f537a47652f8874d41f78b5ec14450d6b498 100755 (executable)
@@ -2,6 +2,8 @@
 
 set -e
 
+ceph mds set allow_new_snaps --yes-i-really-mean-it
+
 #
 # make sure we keep an existing dn's seq
 #
index cdf32e4f0ef6af40cff1e4eda9f4ac80b73aa49f..5a673ff9c0dfca2e46fb90d843d6ad26a1b3d9d7 100755 (executable)
@@ -2,6 +2,8 @@
 
 set -e
 
+ceph mds set allow_new_snaps --yes-i-really-mean-it
+
 # multiple intervening snapshots with no modifications, and thus no
 # snapflush client_caps messages.  make sure the mds can handle this.
 
index a4fb94368d4c1f349bdf73466cb2eeae0be3979c..31ba5a876592d87fe3367c3028ba9749412c690e 100755 (executable)
@@ -1,5 +1,7 @@
 #!/bin/sh -x
 
+ceph mds set allow_new_snaps --yes-i-really-mean-it
+
 mkdir .snap/foo
 
 echo "We want ENOENT, not ESTALE, here."
index 11532d8b14b476142b159ae4daead067a37d815f..71a71e1d4696ad5776861e5e4b155f6bfef52f42 100755 (executable)
@@ -2,6 +2,8 @@
 
 set -e
 
+ceph mds set allow_new_snaps --yes-i-really-mean-it
+
 git clone git://ceph.com/git/ceph.git
 cd ceph
 
index 3cbbe01718e51703b060b4fbf0ec38abb53671cd..d022cfd479e2a0abcb523c2aa3266c53b1e8aeed 100755 (executable)
@@ -1,5 +1,7 @@
 #!/bin/sh -ex
 
+ceph mds set allow_new_snaps --yes-i-really-mean-it
+
 # this tests fix for #1399
 mkdir foo
 mkdir foo/.snap/one
index 5ebc852cf6c75b618598f6620abd0323d095ef49..d88722bde09094572745daa393eff4b8497d0382 100755 (executable)
@@ -2,6 +2,8 @@
 
 set -e
 
+ceph mds set allow_new_snaps --yes-i-really-mean-it
+
 echo asdf > a
 mkdir .snap/1
 chmod 777 a
index 7e5241a27c039b95774ceb80e65bebf1e21f61a4..8963f628dc862b93263cc125dd6af0638c4f8229 100644 (file)
@@ -2,6 +2,8 @@
 
 set -e
 
+ceph mds set allow_new_snaps --yes-i-really-mean-it
+
 echo "making directory tree and files"
 mkdir -p 1/a/b/c/
 echo "i'm file1" > 1/a/file1
index aa094e70789f1f50c60e1f4f409bf981b4f0ad2f..68ecf37b73e6e8c80ae6d786544037815ef1172f 100755 (executable)
@@ -2,6 +2,8 @@
 
 set -e
 
+ceph mds set allow_new_snaps --yes-i-really-mean-it
+
 file=linux-2.6.33.tar.bz2
 wget -q http://ceph.com/qa/$file
 
index 63b7167b42d3122df0ce57a09adec91b40d23ab1..b5b8830e9f02ba672ad869c5ce17c2bf92aa8a09 100755 (executable)
@@ -2,6 +2,8 @@
 
 set -e
 
+ceph mds set allow_new_snaps --yes-i-really-mean-it
+
 #
 # verify that a snap update on a parent realm will induce
 # snap cap writeback for inodes child realms
index b2dd7bc748af263fc14b44b14dffe3d59c2a42ec..c36e2575845518cd30431d523c869c2c21538e94 100755 (executable)
@@ -2,6 +2,8 @@
 
 set -e
 
+ceph mds set allow_new_snaps --yes-i-really-mean-it
+
 echo "testing simple xattr wb"
 touch x
 setfattr -n user.foo x
index 5c71212df75a9b7f63ed82c11349f3a8e50216c0..89e2db0cd1015ef80c4cfd07ac2d5f83f207a6b2 100755 (executable)
@@ -2,6 +2,8 @@
 
 set -e
 
+ceph mds set allow_new_snaps --yes-i-really-mean-it
+
 do_tarball() {
     wget http://ceph.com/qa/$1
     tar xvf$2 $1