2010-06-24 23:48:01 +00:00
|
|
|
#!/bin/sh -x
|
|
|
|
|
2015-11-06 08:53:53 +00:00
|
|
|
expect_failure() {
|
2016-06-30 08:05:57 +00:00
|
|
|
if "$@"; then return 1; else return 0; fi
|
2013-09-25 23:02:02 +00:00
|
|
|
}
|
2010-06-24 23:48:01 +00:00
|
|
|
set -e
|
|
|
|
|
2015-01-14 06:31:51 +00:00
|
|
|
ceph mds set allow_new_snaps false
|
2013-09-25 23:02:02 +00:00
|
|
|
expect_failure mkdir .snap/foo
|
2014-02-05 18:44:40 +00:00
|
|
|
ceph mds set allow_new_snaps true --yes-i-really-mean-it
|
2013-09-25 23:02:02 +00:00
|
|
|
|
2010-06-24 23:48:01 +00:00
|
|
|
echo asdf > foo
|
|
|
|
mkdir .snap/foo
|
|
|
|
grep asdf .snap/foo/foo
|
|
|
|
rmdir .snap/foo
|
|
|
|
|
|
|
|
echo asdf > bar
|
|
|
|
mkdir .snap/bar
|
|
|
|
rm bar
|
|
|
|
grep asdf .snap/bar/bar
|
|
|
|
rmdir .snap/bar
|
2010-08-24 23:01:47 +00:00
|
|
|
rm foo
|
|
|
|
|
2014-02-05 18:44:40 +00:00
|
|
|
ceph mds set allow_new_snaps false
|
2013-09-25 23:02:02 +00:00
|
|
|
expect_failure mkdir .snap/baz
|
|
|
|
|
2014-02-05 18:44:40 +00:00
|
|
|
echo OK
|