]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: allow removal of tier of ec overwritable pool 20433/head
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 30 Jan 2018 22:32:32 +0000 (14:32 -0800)
committerPrashant D <pdhange@redhat.com>
Wed, 14 Feb 2018 10:15:03 +0000 (05:15 -0500)
Fixes: http://tracker.ceph.com/issues/22754
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit d7f7000dd90c35d6689cf9eb1e2ecaea7f4c27fe)

src/mon/OSDMonitor.cc

index 180b6967e65fa3e314839ca12d36886c2515d6c6..eee921cacba1ad882a3d53a779be8d40c3ad7aef 100644 (file)
@@ -11760,10 +11760,13 @@ bool OSDMonitor::_check_remove_tier(
   // Apply CephFS-specific checks
   const FSMap &pending_fsmap = mon->mdsmon()->get_pending();
   if (pending_fsmap.pool_in_use(base_pool_id)) {
-    if (base_pool->type != pg_pool_t::TYPE_REPLICATED) {
-      // If the underlying pool is erasure coded, we can't permit the
-      // removal of the replicated tier that CephFS relies on to access it
-      *ss << "pool '" << base_pool_name << "' is in use by CephFS via its tier";
+    if (base_pool->is_erasure() && !base_pool->allows_ecoverwrites()) {
+      // If the underlying pool is erasure coded and does not allow EC
+      // overwrites, we can't permit the removal of the replicated tier that
+      // CephFS relies on to access it
+      *ss << "pool '" << base_pool_name <<
+          "' does not allow EC overwrites and is in use by CephFS"
+          " via its tier";
       *err = -EBUSY;
       return false;
     }