From: John Spray Date: Thu, 23 Jul 2015 13:11:27 +0000 (+0100) Subject: squashme: move peer failure handling up in handle_mds_map X-Git-Tag: v9.1.0~406^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4fd6c3ba033d202c6d736e36aaaa7d4cfd6714df;p=ceph.git squashme: move peer failure handling up in handle_mds_map squash into: mds: big MDS refactor stage 2: encapsulation --- diff --git a/src/mds/MDSDaemon.cc b/src/mds/MDSDaemon.cc index d5823d8457ad..e0c317e8cf7d 100644 --- a/src/mds/MDSDaemon.cc +++ b/src/mds/MDSDaemon.cc @@ -843,6 +843,16 @@ void MDSDaemon::handle_mds_map(MMDSMap *m) goto out; } + // mark down any failed peers + for (map::const_iterator p = oldmap->get_mds_info().begin(); + p != oldmap->get_mds_info().end(); + ++p) { + if (mdsmap->get_mds_info().count(p->first) == 0) { + dout(10) << " peer mds gid " << p->first << " removed from map" << dendl; + messenger->mark_down(p->second.addr); + } + } + // If I was put into standby replay, but I am configured for a different standby // type, ignore the map's state and request my standby type (only used // for oneshot replay?) @@ -859,16 +869,6 @@ void MDSDaemon::handle_mds_map(MMDSMap *m) whoami = mdsmap->get_mds_info_gid(mds_gid_t(monc->get_global_id())).standby_for_rank; } - // mark down any failed peers - for (map::const_iterator p = oldmap->get_mds_info().begin(); - p != oldmap->get_mds_info().end(); - ++p) { - if (mdsmap->get_mds_info().count(p->first) == 0) { - dout(10) << " peer mds gid " << p->first << " removed from map" << dendl; - messenger->mark_down(p->second.addr); - } - } - // see who i am addr = messenger->get_myaddr(); dout(10) << "map says i am " << addr << " mds." << whoami << "." << incarnation