mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
osd,mds: 'config unset' tell command
Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
0db8fd2418
commit
5b603ec8e6
@ -659,6 +659,10 @@ COMMAND("config set " \
|
||||
"name=key,type=CephString name=value,type=CephString",
|
||||
"Set a configuration option at runtime (not persistent)",
|
||||
"mds", "*", "cli,rest")
|
||||
COMMAND("config unset " \
|
||||
"name=key,type=CephString",
|
||||
"Unset a configuration option at runtime (not persistent)",
|
||||
"mds", "*", "cli,rest")
|
||||
COMMAND("exit",
|
||||
"Terminate this MDS",
|
||||
"mds", "*", "cli,rest")
|
||||
@ -799,6 +803,13 @@ int MDSDaemon::_handle_command(
|
||||
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);
|
||||
}
|
||||
} else if (prefix == "exit") {
|
||||
// We will send response before executing
|
||||
ss << "Exiting...";
|
||||
|
@ -5828,6 +5828,10 @@ COMMAND("config set " \
|
||||
"name=key,type=CephString name=value,type=CephString",
|
||||
"Set a configuration option at runtime (not persistent)",
|
||||
"osd", "rw", "cli,rest")
|
||||
COMMAND("config unset " \
|
||||
"name=key,type=CephString",
|
||||
"Unset a configuration option at runtime (not persistent)",
|
||||
"osd", "rw", "cli,rest")
|
||||
COMMAND("cluster_log " \
|
||||
"name=level,type=CephChoices,strings=error,warning,info,debug " \
|
||||
"name=message,type=CephString,n=N",
|
||||
@ -5957,6 +5961,16 @@ void OSD::do_command(Connection *con, ceph_tid_t tid, vector<string>& cmd, buffe
|
||||
}
|
||||
osd_lock.Lock();
|
||||
}
|
||||
else if (prefix == "config unset") {
|
||||
std::string key;
|
||||
cmd_getval(cct, cmdmap, "key", key);
|
||||
osd_lock.Unlock();
|
||||
r = cct->_conf->rm_val(key);
|
||||
if (r == 0) {
|
||||
cct->_conf->apply_changes(nullptr);
|
||||
}
|
||||
osd_lock.Lock();
|
||||
}
|
||||
else if (prefix == "cluster_log") {
|
||||
vector<string> msg;
|
||||
cmd_getval(cct, cmdmap, "message", msg);
|
||||
|
Loading…
Reference in New Issue
Block a user