From: Douglas Fuller Date: Mon, 31 Jul 2017 14:47:29 +0000 (-0400) Subject: cephfs: Resend discover when joining from starting state X-Git-Tag: ses5-milestone10~3^2~20^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=58073cfcd15f10afcab5a318b8434dfc5c7d28e5;p=ceph.git cephfs: Resend discover when joining from starting state From: Zheng Yan Kick discover messages when transitioning from STATE_STARTING to STATE_ACTIVE. Fixes: http://tracker.ceph.com/issues/20799 Signed-off-by: Douglas Fuller --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 9fc11eef93b7..eebbc0d42ee4 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -9715,7 +9715,7 @@ void MDCache::handle_discover(MDiscover *dis) if (mds->get_state() <= MDSMap::STATE_REJOIN) { if (mds->get_state() < MDSMap::STATE_REJOIN && - mds->get_want_state() != CEPH_MDS_STATE_REJOIN) { + mds->get_want_state() < CEPH_MDS_STATE_REJOIN) { dis->put(); return; } diff --git a/src/mds/MDSRank.cc b/src/mds/MDSRank.cc index 879568277744..0c128a872163 100644 --- a/src/mds/MDSRank.cc +++ b/src/mds/MDSRank.cc @@ -1666,7 +1666,7 @@ void MDSRankDispatcher::handle_mds_map( // REJOIN // is everybody finally rejoining? - if (is_rejoin() || is_clientreplay() || is_active() || is_stopping()) { + if (is_starting() || is_rejoin() || is_clientreplay() || is_active() || is_stopping()) { // did we start? if (!oldmap->is_rejoining() && mdsmap->is_rejoining()) rejoin_joint_start(); @@ -1676,7 +1676,8 @@ void MDSRankDispatcher::handle_mds_map( oldmap->is_rejoining() && !mdsmap->is_rejoining()) mdcache->dump_cache(); // for DEBUG only - if (oldstate >= MDSMap::STATE_REJOIN) { + if (oldstate >= MDSMap::STATE_REJOIN || + oldstate == MDSMap::STATE_STARTING) { // ACTIVE|CLIENTREPLAY|REJOIN => we can discover from them. set olddis, dis; oldmap->get_mds_set(olddis, MDSMap::STATE_ACTIVE);