From: John Spray Date: Tue, 25 Nov 2014 16:54:42 +0000 (+0000) Subject: mon: OSDMonitor: allow adding tiers to FS pools X-Git-Tag: v0.87.1~55^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7cd8c3f8a5afa9481b6f6a78d5fb8c04784ef4ca;p=ceph.git mon: OSDMonitor: allow adding tiers to FS pools This was an overly-strict check. In fact it is perfectly fine to set an overlay on a pool that is already in use as a filesystem data or metadata pool. Fixes: #10135 Signed-off-by: John Spray (cherry picked from commit 17b5fc9a40440e76dd1fa64f7fc19577ae3b58ce) --- diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index fc02e301e553..8dbb58536493 100755 --- a/qa/workunits/cephtool/test.sh +++ b/qa/workunits/cephtool/test.sh @@ -566,6 +566,21 @@ function test_mon_mds() ceph fs rm cephfs --yes-i-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 + + # Adding overlay to FS pool should be permitted, RADOS clients handle this. + ceph osd tier add fs_metadata mds-tier + 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 + 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 diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 04902bbe9cc3..9e341d396346 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -5601,10 +5601,6 @@ done: goto reply; } - if (!_check_remove_tier(pool_id, p, &err, &ss)) { - goto reply; - } - // go pg_pool_t *np = pending_inc.get_new_pool(pool_id, p); np->read_tier = overlaypool_id;