]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: verify mdsmap compatset on startup
authorSage Weil <sage@newdream.net>
Thu, 22 Apr 2010 20:41:17 +0000 (13:41 -0700)
committerSage Weil <sage@newdream.net>
Thu, 22 Apr 2010 22:12:58 +0000 (15:12 -0700)
src/mds/MDS.cc

index 38b560d84b005edc9d687adfe695b481c5c418e1..54979c614d5a15c818353e8285708cf3ad154eee 100644 (file)
@@ -691,6 +691,17 @@ void MDS::handle_mds_map(MMDSMap *m)
 
   monc->sub_got("mdsmap", mdsmap->get_epoch());
 
+  // verify compatset
+  dout(10) << "     my compat " << mdsmap_compat << dendl;
+  dout(10) << " mdsmap compat " << mdsmap->compat << dendl;
+  if (!mdsmap_compat.writeable(mdsmap->compat)) {
+    dout(0) << "handle_mds_map mdsmap compatset " << mdsmap->compat
+           << " not writeable with daemon features " << mdsmap_compat
+           << ", killing myself" << dendl;
+    suicide();
+    goto out;
+  }
+
   // see who i am
   addr = messenger->get_myaddr();
   whoami = mdsmap->get_rank_gid(monc->get_global_id());