asok_hook,
"Enumerate connected CephFS clients");
ceph_assert(r == 0);
- r = admin_socket->register_command("session config name=client_id,type=CephInt,req=true "
+ r = admin_socket->register_command("session config "
+ "name=client_id,type=CephInt,req=true "
+ "name=option,type=CephString,req=true "
+ "name=value,type=CephString,req=false ",
+ asok_hook,
+ "Config a CephFS client session");
+ assert(r == 0);
+ r = admin_socket->register_command("client config "
+ "name=client_id,type=CephInt,req=true "
"name=option,type=CephString,req=true "
"name=value,type=CephString,req=false ",
asok_hook,
const std::vector<MDSDaemon::MDSCommand>& MDSDaemon::get_commands()
{
static const std::vector<MDSCommand> commands = {
- MDSCommand("session config name=client_id,type=CephInt name=option,type=CephString name=value,type=CephString,req=false",
- "Config a client session"),
- MDSCommand("client config name=client_id,type=CephInt name=option,type=CephString name=value,type=CephString,req=false",
- "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("cache drop name=timeout,type=CephInt,range=0,req=false", "trim cache and optionally request client to release all caps and flush the journal"),
dout(15) << ss.str() << dendl;
r = -ENOENT;
}
- } else if (command == "session config") {
+ } else if (command == "session config" ||
+ command == "client config") {
int64_t client_id;
std::string option;
std::string value;
std::string prefix;
cmd_getval(g_ceph_context, cmdmap, "prefix", prefix);
- if (prefix == "session config" || prefix == "client config") {
- int64_t client_id;
- std::string option;
- std::string value;
-
- cmd_getval(g_ceph_context, cmdmap, "client_id", client_id);
- cmd_getval(g_ceph_context, cmdmap, "option", option);
- bool got_value = cmd_getval(g_ceph_context, cmdmap, "value", value);
-
- *r = config_client(client_id, !got_value, option, value, *ss);
- return true;
- } else if (prefix == "damage ls") {
+ if (prefix == "damage ls") {
JSONFormatter f(true);
damage_table.dump(&f);
f.flush(*ds);