]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/PGMonitor: disable old 'pg set_[near]full_ratio ...' in luminous
authorSage Weil <sage@redhat.com>
Thu, 23 Feb 2017 20:50:41 +0000 (15:50 -0500)
committerSage Weil <sage@redhat.com>
Mon, 6 Mar 2017 21:42:34 +0000 (16:42 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/PGMonitor.cc

index 44708922f22590c3f7e0d744134478a16bfe4ca6..4fd2109b664b8abf08e84dc70c8c067550998c93 100644 (file)
@@ -1344,6 +1344,12 @@ bool PGMonitor::prepare_command(MonOpRequestRef op)
     goto update;
   } else if (prefix == "pg set_full_ratio" ||
              prefix == "pg set_nearfull_ratio") {
+    if (mon->osdmon()->osdmap.test_flag(CEPH_OSDMAP_REQUIRE_LUMINOUS)) {
+      ss << "please use the new luminous interfaces"
+        << " ('osd set-full-ratio' and 'osd set-nearfull-ratio')";
+      r = -EPERM;
+      goto reply;
+    }
     double n;
     if (!cmd_getval(g_ceph_context, cmdmap, "ratio", n)) {
       ss << "unable to parse 'ratio' value '"