]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: update cephtool test for CephFS tier cases 6402/head
authorJohn Spray <john.spray@redhat.com>
Mon, 1 Jun 2015 12:55:22 +0000 (13:55 +0100)
committerNathan Cutler <ncutler@suse.com>
Tue, 27 Oct 2015 20:19:14 +0000 (21:19 +0100)
1. Creating a filesystem using a
   readonly tier on an EC pool (should be forbidden)
2. Removing a tier from a replicated base pool (should
   be permitted)

Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit f9b11b0abe7c2b0dcdfc5802336be8a0426ccb3a)

qa/workunits/cephtool/test.sh

index 3c39a241282478d92b00f276597c8a7ceb67a81b..67cd3648e9b78c36c5bd1f6cb56fb969b0c3b2c4 100755 (executable)
@@ -829,15 +829,21 @@ function test_mon_mds()
   check_response 'erasure-code' $? 22
   set -e
 
-  # ... however if we create a cache tier in front of the EC pool, we should
-  # be permitted to use it...
+  # ... new create a cache tier in front of the EC pool...
   ceph osd pool create mds-tier 2
   ceph osd tier add mds-ec-pool mds-tier
   ceph osd tier set-overlay mds-ec-pool mds-tier
-  ceph osd tier cache-mode mds-tier writeback
   tier_poolnum=$(ceph osd dump | grep "pool.* 'mds-tier" | awk '{print $2;}')
 
+  # Use of a readonly tier should be forbidden
+  ceph osd tier cache-mode mds-tier readonly
+  set +e
+  ceph fs new cephfs fs_metadata mds-ec-pool 2>$TMPFILE
+  check_response 'has a write tier (mds-tier) that is configured to forward' $? 22
   set -e
+
+  # Use of a writeback tier should enable FS creation
+  ceph osd tier cache-mode mds-tier writeback
   ceph fs new cephfs fs_metadata mds-ec-pool
 
   # While a FS exists using the tiered pools, I should not be allowed
@@ -884,6 +890,7 @@ function test_mon_mds()
 
   fail_all_mds
   ceph fs rm cephfs --yes-i-really-mean-it
+  ceph osd pool delete mds-ec-pool mds-ec-pool --yes-i-really-really-mean-it
 
   # Create a FS and check that we can subsequently add a cache tier to it
   ceph fs new cephfs fs_metadata fs_data
@@ -893,16 +900,16 @@ function test_mon_mds()
   ceph osd tier cache-mode mds-tier writeback
   ceph osd tier set-overlay fs_metadata mds-tier
 
-  # Clean up FS
-  fail_all_mds
-  ceph fs rm cephfs --yes-i-really-mean-it
-
-  # Clean up overlay/tier relationship
+  # Removing tier should be permitted because the underlying pool is
+  # replicated (#11504 case)
+  ceph osd tier cache-mode mds-tier forward
   ceph osd tier remove-overlay fs_metadata
   ceph osd tier remove fs_metadata mds-tier
-
   ceph osd pool delete mds-tier mds-tier --yes-i-really-really-mean-it
-  ceph osd pool delete mds-ec-pool mds-ec-pool --yes-i-really-really-mean-it
+
+  # Clean up FS
+  fail_all_mds
+  ceph fs rm cephfs --yes-i-really-mean-it
 
   ceph mds stat
   # ceph mds tell mds.a getmap