From: Sage Weil Date: Fri, 13 Dec 2019 20:34:31 +0000 (-0600) Subject: mds/MDSDaemon: fix asok 'exit' and 'respawn' commands X-Git-Tag: v15.1.0~496^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=e69bbada0b9ed925cd5ff0182071a44f7abe50e4;p=ceph-ci.git mds/MDSDaemon: fix asok 'exit' and 'respawn' commands Signed-off-by: Sage Weil --- diff --git a/src/mds/MDSDaemon.cc b/src/mds/MDSDaemon.cc index 946177e426a..4959210dec1 100644 --- a/src/mds/MDSDaemon.cc +++ b/src/mds/MDSDaemon.cc @@ -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";