]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
squashme: move peer failure handling up in handle_mds_map
authorJohn Spray <john.spray@redhat.com>
Thu, 23 Jul 2015 13:11:27 +0000 (14:11 +0100)
committerJohn Spray <john.spray@redhat.com>
Tue, 28 Jul 2015 08:05:09 +0000 (09:05 +0100)
squash into: mds: big MDS refactor stage 2: encapsulation

src/mds/MDSDaemon.cc

index d5823d8457ad064b2150e4abf1c494134c707939..e0c317e8cf7de507d2e3c500ad2eeec2322b7650 100644 (file)
@@ -843,6 +843,16 @@ void MDSDaemon::handle_mds_map(MMDSMap *m)
     goto out;
   }
 
+  // mark down any failed peers
+  for (map<mds_gid_t,MDSMap::mds_info_t>::const_iterator p = oldmap->get_mds_info().begin();
+       p != oldmap->get_mds_info().end();
+       ++p) {
+    if (mdsmap->get_mds_info().count(p->first) == 0) {
+      dout(10) << " peer mds gid " << p->first << " removed from map" << dendl;
+      messenger->mark_down(p->second.addr);
+    }
+  }
+
   // If I was put into standby replay, but I am configured for a different standby
   // type, ignore the map's state and request my standby type (only used
   // for oneshot replay?)
@@ -859,16 +869,6 @@ void MDSDaemon::handle_mds_map(MMDSMap *m)
     whoami = mdsmap->get_mds_info_gid(mds_gid_t(monc->get_global_id())).standby_for_rank;
   }
 
-  // mark down any failed peers
-  for (map<mds_gid_t,MDSMap::mds_info_t>::const_iterator p = oldmap->get_mds_info().begin();
-       p != oldmap->get_mds_info().end();
-       ++p) {
-    if (mdsmap->get_mds_info().count(p->first) == 0) {
-      dout(10) << " peer mds gid " << p->first << " removed from map" << dendl;
-      messenger->mark_down(p->second.addr);
-    }
-  }
-
   // see who i am
   addr = messenger->get_myaddr();
   dout(10) << "map says i am " << addr << " mds." << whoami << "." << incarnation