From e5881a21b4095840a876668d38122c37f2e6c3af Mon Sep 17 00:00:00 2001 From: sageweil Date: Wed, 1 Aug 2007 20:50:44 +0000 Subject: [PATCH] mon_allow_mds_bully git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1585 29311d96-e01e-0410-9327-a35deaab8ce9 --- branches/sage/mds/config.cc | 1 + branches/sage/mds/config.h | 1 + branches/sage/mds/mon/MDSMonitor.cc | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/branches/sage/mds/config.cc b/branches/sage/mds/config.cc index 97e32b9cabae2..1be62eea52cfc 100644 --- a/branches/sage/mds/config.cc +++ b/branches/sage/mds/config.cc @@ -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, diff --git a/branches/sage/mds/config.h b/branches/sage/mds/config.h index 5499470756bd7..9d6fe0dbc3a02 100644 --- a/branches/sage/mds/config.h +++ b/branches/sage/mds/config.h @@ -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; diff --git a/branches/sage/mds/mon/MDSMonitor.cc b/branches/sage/mds/mon/MDSMonitor.cc index e0bb3745384c4..8865bb7498e97 100644 --- a/branches/sage/mds/mon/MDSMonitor.cc +++ b/branches/sage/mds/mon/MDSMonitor.cc @@ -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 { -- 2.39.5