]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: test that pools used in tiers cannot be removed 2001/head
authorLoic Dachary <loic@dachary.org>
Fri, 20 Jun 2014 07:38:39 +0000 (09:38 +0200)
committerLoic Dachary <loic@dachary.org>
Fri, 20 Jun 2014 07:52:31 +0000 (09:52 +0200)
Signed-off-by: Loic Dachary <loic@dachary.org>
qa/workunits/cephtool/test.sh

index dc99a086da6c1c41e1e2c4ee4e33662a7ca98dfd..e7a19d43422116a5cd102a72d0f86e3a954f0b18 100755 (executable)
@@ -188,6 +188,18 @@ ceph osd dump | grep cache3 | grep bloom | grep 'false_positive_probability: 0.0
 ceph osd tier remove data cache3
 ceph osd pool delete cache3 cache3 --yes-i-really-really-mean-it
 
+# protection against pool removal when used as tiers
+ceph osd pool create datapool 2
+ceph osd pool create cachepool 2
+ceph osd tier add-cache datapool cachepool 1024000
+ceph osd pool delete cachepool cachepool --yes-i-really-really-mean-it 2> $TMPFILE || true
+check_response "EBUSY: pool 'cachepool' is a tier of 'datapool'"
+ceph osd pool delete datapool datapool --yes-i-really-really-mean-it 2> $TMPFILE || true
+check_response "EBUSY: pool 'datapool' has tiers cachepool"
+ceph osd tier remove datapool cachepool
+ceph osd pool delete cachepool cachepool --yes-i-really-really-mean-it
+ceph osd pool delete datapool datapool --yes-i-really-really-mean-it
+
 # check health check
 ceph osd pool create cache4 2
 ceph osd pool set cache4 target_max_objects 5