]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
fixed non-mkfs startup mds shutdown idiocy
authorsageweil <sageweil@29311d96-e01e-0410-9327-a35deaab8ce9>
Tue, 14 Aug 2007 17:51:08 +0000 (17:51 +0000)
committersageweil <sageweil@29311d96-e01e-0410-9327-a35deaab8ce9>
Tue, 14 Aug 2007 17:51:08 +0000 (17:51 +0000)
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1633 29311d96-e01e-0410-9327-a35deaab8ce9

branches/sage/mds/mon/MDSMonitor.cc

index f4ded2330d20ed344e045500c580f5bd5c45c661..de451f5bf3202522afa246daa3419c25920a3224 100644 (file)
@@ -95,14 +95,6 @@ bool MDSMonitor::update_from_paxos()
     bcast_latest_mds();
   send_to_waiting();
 
-  // hackish: did all mds's shut down?
-  if (mon->is_leader() &&
-      g_conf.mon_stop_with_last_mds &&
-      mdsmap.get_epoch() > 1 &&
-      mdsmap.is_stopped()) 
-    mon->messenger->send_message(new MGenericMessage(MSG_SHUTDOWN), 
-                                mon->monmap->get_inst(mon->whoami));
-
   return true;
 }
 
@@ -386,6 +378,15 @@ void MDSMonitor::_updated(int from, MMDSBeacon *m)
     // send the map manually (they're out of the map, so they won't get it automatic)
     send_latest(m->get_mds_inst());
   }
+
+  // hackish: did all mds's shut down?
+  if (mon->is_leader() &&
+      g_conf.mon_stop_with_last_mds &&
+      mdsmap.get_epoch() > 1 &&
+      mdsmap.is_stopped()) 
+    mon->messenger->send_message(new MGenericMessage(MSG_SHUTDOWN), 
+                                mon->monmap->get_inst(mon->whoami));
+
   delete m;
 }