]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
OSDMonitor: disallow ec pools as tiers 4961/head
authorSamuel Just <sjust@redhat.com>
Fri, 15 May 2015 20:05:40 +0000 (13:05 -0700)
committerSage Weil <sage@redhat.com>
Mon, 15 Jun 2015 19:26:15 +0000 (12:26 -0700)
Fixes: 11650
Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit 11b7801bb57cb25cd2d26d58722d49691747725b)

qa/workunits/cephtool/test.sh
src/mon/OSDMonitor.cc

index e1773f20cf87212937533c94e1b75629f9581d23..081d13b97d2246792a55120c7a7c83ae96a36399 100755 (executable)
@@ -325,6 +325,13 @@ function test_tiering()
   ceph osd pool delete snap_base snap_base --yes-i-really-really-mean-it
   ceph osd pool delete snap_cache snap_cache --yes-i-really-really-mean-it
 
+  # make sure we can't create an ec pool tier
+  ceph osd pool create eccache 2 2 erasure
+  ceph osd pool create repbase 2
+  expect_false ceph osd tier add repbase eccache
+  ceph osd pool delete repbase repbase --yes-i-really-really-mean-it
+  ceph osd pool delete eccache eccache --yes-i-really-really-mean-it
+
   # convenient add-cache command
   ceph osd pool create cache3 2
   ceph osd tier add-cache slow cache3 1024000
index dc9b8784b6623f8d13699786b89799805d47449a..79b519a0639170d165c5a50f90d6582058eeda02 100644 (file)
@@ -6112,6 +6112,12 @@ done:
       err = -ENOTEMPTY;
       goto reply;
     }
+    if (tp->ec_pool()) {
+      ss << "tier pool '" << tierpoolstr
+        << "' is an ec pool, which cannot be a tier";
+      err = -ENOTSUP;
+      goto reply;
+    }
     if (!tp->removed_snaps.empty() || !tp->snaps.empty()) {
       ss << "tier pool '" << tierpoolstr << "' has snapshot state; it cannot be added as a tier without breaking the pool";
       err = -ENOTEMPTY;