From: John Spray Date: Mon, 1 Jun 2015 12:55:22 +0000 (+0100) Subject: qa: update cephtool test for CephFS tier cases X-Git-Tag: v0.94.6~72^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1448915e49bb6c8abc192053e6f2e8a380c4e92a;p=ceph.git qa: update cephtool test for CephFS tier cases 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 (cherry picked from commit f9b11b0abe7c2b0dcdfc5802336be8a0426ccb3a) --- diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index 3c39a2412824..67cd3648e9b7 100755 --- a/qa/workunits/cephtool/test.sh +++ b/qa/workunits/cephtool/test.sh @@ -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