]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/MDSDaemon: remove old duplicated tell commands
authorSage Weil <sage@redhat.com>
Tue, 29 Oct 2019 20:54:16 +0000 (15:54 -0500)
committerSage Weil <sage@redhat.com>
Fri, 15 Nov 2019 18:42:40 +0000 (12:42 -0600)
These are already handled by the standard asok command set.

Signed-off-by: Sage Weil <sage@redhat.com>
src/mds/MDSDaemon.cc

index 900d4418cead10a6f9926d63a134c47d2baa43d6..a144f2b9f50f69ee2f9aff291c78df1ffdf5e93b 100644 (file)
@@ -524,9 +524,6 @@ void MDSDaemon::handle_command(const cref_t<MCommand> &m)
 const std::vector<MDSDaemon::MDSCommand>& MDSDaemon::get_commands()
 {
   static const std::vector<MDSCommand> commands = {
-    MDSCommand("injectargs name=injected_args,type=CephString,n=N", "inject configuration arguments into running MDS"),
-    MDSCommand("config set name=key,type=CephString name=value,type=CephString", "Set a configuration option at runtime (not persistent)"),
-    MDSCommand("config unset name=key,type=CephString", "Unset a configuration option at runtime (not persistent)"),
     MDSCommand("exit", "Terminate this MDS"),
     MDSCommand("respawn", "Restart this MDS"),
     MDSCommand("session kill name=session_id,type=CephInt", "End a client session"),
@@ -541,7 +538,6 @@ const std::vector<MDSDaemon::MDSCommand>& MDSDaemon::get_commands()
        "Config a client session"),
     MDSCommand("damage ls", "List detected metadata damage"),
     MDSCommand("damage rm name=damage_id,type=CephInt", "Remove a damage table entry"),
-    MDSCommand("version", "report version of MDS"),
     MDSCommand("heap "
         "name=heapcmd,type=CephChoices,strings=dump|start_profiler|stop_profiler|release|stats",
         "show heap usage info (available only if compiled with tcmalloc)"),
@@ -627,48 +623,7 @@ int MDSDaemon::_handle_command(
   }
 
   cmd_getval(cct, cmdmap, "format", format);
-  if (prefix == "version") {
-    if (f) {
-      f->open_object_section("version");
-      f->dump_string("version", pretty_version_to_str());
-      f->close_section();
-      f->flush(ds);
-    } else {
-      ds << pretty_version_to_str();
-    }
-  } else if (prefix == "injectargs") {
-    vector<string> argsvec;
-    cmd_getval(cct, cmdmap, "injected_args", argsvec);
-
-    if (argsvec.empty()) {
-      r = -EINVAL;
-      ss << "ignoring empty injectargs";
-      goto out;
-    }
-    string args = argsvec.front();
-    for (vector<string>::iterator a = ++argsvec.begin(); a != argsvec.end(); ++a)
-      args += " " + *a;
-    r = cct->_conf.injectargs(args, &ss);
-  } else if (prefix == "config set") {
-    std::string key;
-    cmd_getval(cct, cmdmap, "key", key);
-    std::string val;
-    cmd_getval(cct, cmdmap, "value", val);
-    r = cct->_conf.set_val(key, val, &ss);
-    if (r == 0) {
-      cct->_conf.apply_changes(nullptr);
-    }
-  } else if (prefix == "config unset") {
-    std::string key;
-    cmd_getval(cct, cmdmap, "key", key);
-    r = cct->_conf.rm_val(key);
-    if (r == 0) {
-      cct->_conf.apply_changes(nullptr);
-    }
-    if (r == -ENOENT) {
-      r = 0; // idempotent
-    }
-  } else if (prefix == "exit") {
+  if (prefix == "exit") {
     // We will send response before executing
     ss << "Exiting...";
     *run_later = new SuicideLater(this);