]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix mds standby map handling
authorSage Weil <sage@newdream.net>
Mon, 21 Sep 2009 22:11:07 +0000 (15:11 -0700)
committerSage Weil <sage@newdream.net>
Mon, 21 Sep 2009 22:11:26 +0000 (15:11 -0700)
Borken by c6ddbdb4671b3594f9b4d5f54b65f8525935758b

src/mds/MDS.cc

index 8149a7a980ad154e4030baebb1df029be5959d24..139fa59d5b3e7554dd423c7b74591f2fe9f11328 100644 (file)
@@ -607,17 +607,6 @@ void MDS::handle_mds_map(MMDSMap *m)
   state = mdsmap->get_state(addr);
   dout(10) << "map says i am " << addr << " mds" << whoami << " state " << ceph_mds_state_name(state) << dendl;
 
-  if (whoami < 0) {
-    if (want_state == MDSMap::STATE_BOOT) {
-      dout(10) << "not in map yet" << dendl;
-    } else {
-      dout(1) << "handle_mds_map i (" << addr
-             << ") dne in the mdsmap, killing myself" << dendl;
-      suicide();
-    }
-    goto out;
-  }
-
   if (state != oldstate)
     last_state = oldstate;
 
@@ -631,6 +620,17 @@ void MDS::handle_mds_map(MMDSMap *m)
     goto out;
   }
 
+  if (whoami < 0) {
+    if (want_state == MDSMap::STATE_BOOT) {
+      dout(10) << "not in map yet" << dendl;
+    } else {
+      dout(1) << "handle_mds_map i (" << addr
+             << ") dne in the mdsmap, killing myself" << dendl;
+      suicide();
+    }
+    goto out;
+  }
+
   // ??
   assert(whoami >= 0);
   incarnation = mdsmap->get_inc(whoami);