]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: use rank from MDSMap always
authorPatrick Donnelly <pdonnell@redhat.com>
Fri, 22 Feb 2019 00:05:55 +0000 (16:05 -0800)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 28 Feb 2019 05:38:24 +0000 (21:38 -0800)
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 <pdonnell@redhat.com>
src/mds/MDSDaemon.cc

index b830bdf79197ed0100e75f4f81bca9102e7ae9f9..c1bbeb820772e094312cecba6fdb68366403ab45 100644 (file)
@@ -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