]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: Add `ceph osd get-require-min-compat-client` command 19015/head
authorhansbogert <hansbogert@gmail.com>
Sun, 19 Nov 2017 17:28:06 +0000 (18:28 +0100)
committerhansbogert <hansbogert@gmail.com>
Mon, 12 Feb 2018 23:52:22 +0000 (00:52 +0100)
As an antagonist to the already existing `set-require-min-compat-client`

Signed-off-by: hansbogert <hansbogert@gmail.com>
qa/workunits/cephtool/test.sh
src/mon/MonCommands.h
src/mon/OSDMonitor.cc

index 2f01b64ba0951bb0153c686dc76b5956928c77bc..5bb39ba5f43c14da0e91ad8ea5fd1390cbb39f93 100755 (executable)
@@ -1410,6 +1410,7 @@ function test_mon_osd()
   # require-min-compat-client
   expect_false ceph osd set-require-min-compat-client dumpling  # firefly tunables
   ceph osd set-require-min-compat-client luminous
+  ceph osd get-require-min-compat-client | grep luminous
   ceph osd dump | grep 'require_min_compat_client luminous'
 
   #
index 0f1729d4f9a2fb44bcbd47f11ad6ace747a6e34c..0f3002fab87292f3f774e74962f2245ad47ce7bc 100644 (file)
@@ -709,6 +709,9 @@ COMMAND("osd set-nearfull-ratio " \
        "name=ratio,type=CephFloat,range=0.0|1.0", \
        "set usage ratio at which OSDs are marked near-full",
        "osd", "rw", "cli,rest")
+COMMAND("osd get-require-min-compat-client",
+        "get the minimum client version we will maintain compatibility with",
+        "osd", "r", "cli,rest")
 COMMAND("osd set-require-min-compat-client " \
        "name=version,type=CephString " \
        "name=sure,type=CephChoices,strings=--yes-i-really-mean-it,req=false", \
index a74191aabf331c3c9a413ac8831ecfc771d71305..ece3f32f479310262d27946aff33f1b31e4ee3ee 100644 (file)
@@ -4940,6 +4940,11 @@ bool OSDMonitor::preprocess_command(MonOpRequestRef op)
       rdata.append(ss.str());
       ss.str("");
     }
+  } else if (prefix == "osd get-require-min-compat-client") {
+    ss << ceph_release_name(osdmap.require_min_compat_client) << std::endl;
+    rdata.append(ss.str());
+    ss.str("");
+    goto reply;
   } else {
     // try prepare update
     return false;