From: Patrick Donnelly Date: Fri, 22 Feb 2019 00:05:55 +0000 (-0800) Subject: mds: use rank from MDSMap always X-Git-Tag: v14.1.1~93^2~10 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e396a5d27aeb03a293225503499fe917b57b74f2;p=ceph.git mds: use rank from MDSMap always This old bit of code was using standby_for_rank to determine what rank it should follow but, for the last few releases, the Monitor always sets the the rank to follow. Signed-off-by: Patrick Donnelly --- diff --git a/src/mds/MDSDaemon.cc b/src/mds/MDSDaemon.cc index b830bdf79197..c1bbeb820772 100644 --- a/src/mds/MDSDaemon.cc +++ b/src/mds/MDSDaemon.cc @@ -893,8 +893,7 @@ void MDSDaemon::handle_mds_map(const MMDSMap::const_ref &m) monc->sub_got("mdsmap", mdsmap->get_epoch()); - // Calculate my effective rank (either my owned rank or my - // standby_for_rank if in standby replay) + // Calculate my effective rank (either my owned rank or the rank I'm following if STATE_STANDBY_REPLAY mds_rank_t whoami = mdsmap->get_rank_gid(mds_gid_t(monc->get_global_id())); // verify compatset @@ -917,11 +916,6 @@ void MDSDaemon::handle_mds_map(const MMDSMap::const_ref &m) } } - if (whoami == MDS_RANK_NONE && - new_state == MDSMap::STATE_STANDBY_REPLAY) { - whoami = mdsmap->get_mds_info_gid(mds_gid_t(monc->get_global_id())).standby_for_rank; - } - // see who i am dout(10) << "my gid is " << monc->get_global_id() << dendl; dout(10) << "map says I am mds." << whoami << "." << incarnation