]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon_allow_mds_bully
authorsageweil <sageweil@29311d96-e01e-0410-9327-a35deaab8ce9>
Wed, 1 Aug 2007 20:50:44 +0000 (20:50 +0000)
committersageweil <sageweil@29311d96-e01e-0410-9327-a35deaab8ce9>
Wed, 1 Aug 2007 20:50:44 +0000 (20:50 +0000)
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1585 29311d96-e01e-0410-9327-a35deaab8ce9

branches/sage/mds/config.cc
branches/sage/mds/config.h
branches/sage/mds/mon/MDSMonitor.cc

index 97e32b9cabae257fed8ca62633c75162af090d4b..1be62eea52cfce5e0226c873d513b9e1703b3699 100644 (file)
@@ -137,6 +137,7 @@ md_config_t g_conf = {
   mon_accept_timeout: 10.0,    // on leader, if paxos update isn't accepted
   mon_stop_on_last_unmount: false,
   mon_stop_with_last_mds: false,
+  mon_allow_mds_bully: true,   // allow a booting mds to (forcibly) claim an mds #
 
   // --- client ---
   client_cache_size: 300,
index 5499470756bd7bd9eb9032701e7f97f0f60e45c3..9d6fe0dbc3a023e7df05c495c475767639fa1f79 100644 (file)
@@ -123,6 +123,7 @@ struct md_config_t {
   float mon_accept_timeout;
   bool mon_stop_on_last_unmount;
   bool mon_stop_with_last_mds;
+  bool mon_allow_mds_bully;
 
   // client
   int      client_cache_size;
index e0bb3745384c41fa13ea7f508f12db0fbd91df15..8865bb7498e97f220d59cc4086ed2ddb9bd5cec2 100644 (file)
@@ -248,7 +248,8 @@ bool MDSMonitor::handle_beacon(MMDSBeacon *m)
     // assign a name.
     if (from >= 0) {
       // wants to be (or already is) a specific MDS. 
-      if (!mdsmap.have_inst(from) || mdsmap.get_inst(from) != m->get_mds_inst()) {
+      if (!g_conf.mon_allow_mds_bully &&
+         (!mdsmap.have_inst(from) || mdsmap.get_inst(from) != m->get_mds_inst())) {
        dout(10) << "mds_beacon boot: mds" << from << " is someone else" << endl;
        from = -1;
       } else {