From: John Spray Date: Wed, 12 Jul 2017 14:09:33 +0000 (-0400) Subject: mds: implement `config set` X-Git-Tag: v12.1.2~192^2~20 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a1cf36bfc02ed4a7728d44faf03718a843d718e1;p=ceph.git mds: implement `config set` Signed-off-by: John Spray --- diff --git a/src/mds/MDSDaemon.cc b/src/mds/MDSDaemon.cc index 62b2a02f695..86f43eca29d 100644 --- a/src/mds/MDSDaemon.cc +++ b/src/mds/MDSDaemon.cc @@ -641,6 +641,10 @@ COMMAND("injectargs " \ "name=injected_args,type=CephString,n=N", "inject configuration arguments into running MDS", "mds", "*", "cli,rest") +COMMAND("config set " \ + "name=key,type=CephString name=value,type=CephString", + "Set a configuration option at runtime (not persistent)", + "mds", "*", "cli,rest") COMMAND("exit", "Terminate this MDS", "mds", "*", "cli,rest") @@ -757,6 +761,12 @@ int MDSDaemon::_handle_command( for (vector::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, true, &ss); } else if (prefix == "exit") { // We will send response before executing ss << "Exiting...";