]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix shutdown while in standby 5739/head
authorJohn Spray <john.spray@redhat.com>
Fri, 28 Aug 2015 13:23:30 +0000 (14:23 +0100)
committerJohn Spray <john.spray@redhat.com>
Tue, 1 Sep 2015 12:30:00 +0000 (13:30 +0100)
Fixes: #12776
Signed-off-by: John Spray <john.spray@redhat.com>
src/mds/MDSDaemon.cc
src/mds/MDSRank.cc

index 0ab6473c98f04ed0b711e1246d9952cdeb1461fe..7d23722792c5a934218c29830192ecf8f2e5ef05 100644 (file)
@@ -993,10 +993,28 @@ void MDSDaemon::suicide()
 
   clean_up_admin_socket();
 
+  // Inform MDS we are going away, then shut down beacon
   beacon.set_want_state(mdsmap, MDSMap::STATE_DNE);
+  if (!mdsmap->is_dne_gid(mds_gid_t(monc->get_global_id()))) {
+    // Notify the MDSMonitor that we're dying, so that it doesn't have to
+    // wait for us to go laggy.  Only do this if we're actually in the
+    // MDSMap, because otherwise the MDSMonitor will drop our message.
+    beacon.send_and_wait(1);
+  }
+  beacon.shutdown();
+
+  timer.shutdown();
 
   if (mds_rank) {
     mds_rank->shutdown();
+  } else {
+
+    if (objecter->initialized.read()) {
+      objecter->shutdown();
+    }
+
+    monc->shutdown();
+    messenger->shutdown();
   }
 }
 
index 7f3ea2bd35a00c5f423d4a38cf0d87c2129baeca..715bf832ec0307c60adb989fb5c9cbc03be308ce 100644 (file)
@@ -206,13 +206,6 @@ void MDSRankDispatcher::shutdown()
 
   dout(1) << __func__ << ": shutting down rank " << whoami << dendl;
 
-  if (!mdsmap->is_dne_gid(mds_gid_t(monc->get_global_id()))) {
-    // Notify the MDSMonitor that we're dying, so that it doesn't have to
-    // wait for us to go laggy.  Only do this if we're actually in the
-    // MDSMap, because otherwise the MDSMonitor will drop our message.
-    beacon.send_and_wait(1);
-  }
-
   timer.shutdown();
 
   // MDLog has to shut down before the finisher, because some of its
@@ -221,9 +214,6 @@ void MDSRankDispatcher::shutdown()
 
   finisher->stop(); // no flushing
 
-  // stop timers
-  beacon.shutdown();
-
   // shut down cache
   mdcache->shutdown();