mirror of
https://github.com/ceph/ceph
synced 2025-03-07 16:58:39 +00:00
mon: implement config set
Signed-off-by: John Spray <john.spray@redhat.com>
This commit is contained in:
parent
a1cf36bfc0
commit
c74b2d9fc7
@ -211,6 +211,10 @@ COMMAND_WITH_FLAG("injectargs " \
|
|||||||
"name=injected_args,type=CephString,n=N", \
|
"name=injected_args,type=CephString,n=N", \
|
||||||
"inject config arguments into monitor", "mon", "rw", "cli,rest",
|
"inject config arguments into monitor", "mon", "rw", "cli,rest",
|
||||||
FLAG(NOFORWARD))
|
FLAG(NOFORWARD))
|
||||||
|
COMMAND("config set " \
|
||||||
|
"name=key,type=CephString name=value,type=CephString",
|
||||||
|
"Set a configuration option at runtime (not persistent)",
|
||||||
|
"mon", "rw", "cli,rest")
|
||||||
COMMAND("status", "show cluster status", "mon", "r", "cli,rest")
|
COMMAND("status", "show cluster status", "mon", "r", "cli,rest")
|
||||||
COMMAND("health name=detail,type=CephChoices,strings=detail,req=false", \
|
COMMAND("health name=detail,type=CephChoices,strings=detail,req=false", \
|
||||||
"show cluster health", "mon", "r", "cli,rest")
|
"show cluster health", "mon", "r", "cli,rest")
|
||||||
|
@ -3261,6 +3261,14 @@ void Monitor::handle_command(MonOpRequestRef op)
|
|||||||
f->flush(rdata);
|
f->flush(rdata);
|
||||||
r = 0;
|
r = 0;
|
||||||
rs = "";
|
rs = "";
|
||||||
|
} else if (prefix == "config set") {
|
||||||
|
std::string key;
|
||||||
|
cmd_getval(cct, cmdmap, "key", key);
|
||||||
|
std::string val;
|
||||||
|
cmd_getval(cct, cmdmap, "value", val);
|
||||||
|
r = g_conf->set_val(key, val, true, &ss);
|
||||||
|
rs = ss.str();
|
||||||
|
goto out;
|
||||||
} else if (prefix == "status" ||
|
} else if (prefix == "status" ||
|
||||||
prefix == "health" ||
|
prefix == "health" ||
|
||||||
prefix == "df") {
|
prefix == "df") {
|
||||||
|
Loading…
Reference in New Issue
Block a user