mds/MDSDaemon: fix asok 'exit' and 'respawn' commands

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2019-12-13 14:34:31 -06:00
parent 0852827258
commit e69bbada0b

View File

@ -148,8 +148,10 @@ void MDSDaemon::asok_command(
// Wait a little to improve chances of caller getting
// our response before seeing us disappear from mdsmap
sleep(1);
std::lock_guard l(mds_lock);
suicide();
});
t.detach();
} else if (command == "respawn") {
outbl.append("Respawning...\n");
r = 0;
@ -157,8 +159,10 @@ void MDSDaemon::asok_command(
// Wait a little to improve chances of caller getting
// our response before seeing us disappear from mdsmap
sleep(1);
std::lock_guard l(mds_lock);
respawn();
});
t.detach();
} else if (command == "heap") {
if (!ceph_using_tcmalloc()) {
ss << "not using tcmalloc";