]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds: make a quick exit if suicide
authorhuanwen ren <ren.huanwen@zte.com.cn>
Thu, 26 May 2016 11:38:20 +0000 (19:38 +0800)
committerhuanwen ren <ren.huanwen@zte.com.cn>
Thu, 26 May 2016 11:38:20 +0000 (19:38 +0800)
make a quick exit if suicide

Signed-off-by: huanwen ren <ren.huanwen@zte.com.cn>
src/mds/MDSDaemon.cc

index e338226c0590e0af1d55781932ab2999c6fdb500..5929fa6ba5ef95bcf1c10789531a43b41b83f873 100644 (file)
@@ -539,6 +539,9 @@ int MDSDaemon::init()
   mds_lock.Lock();
   if (beacon.get_want_state() == MDSMap::STATE_DNE) {
     suicide();  // we could do something more graceful here
+    dout(4) << __func__ << ": terminated already, dropping out" << dendl;
+    mds_lock.Unlock();
+    return 0; 
   }
 
   timer.init();