From: Greg Farnum Date: Wed, 3 Apr 2013 19:43:49 +0000 (-0700) Subject: mds: do not go through handle_mds_failure for oneself X-Git-Tag: v0.62~95 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0d6ddd926432821842a7e40fdb78d793ab0737bb;p=ceph.git mds: do not go through handle_mds_failure for oneself A standby MDS can attempt the handle_mds_failure paths for itself, if it sees the transition from up to down. This leads it to insert itself into the resolve_gather set, which is bad. So check if the failed MDS is the same as whoami, and abort if so. This fixes #4637. Signed-off-by: Greg Farnum Reviewed-by: Yan, Zheng --- diff --git a/src/mds/MDS.cc b/src/mds/MDS.cc index 1fa03039ecb7f..3b3b2d6dc2eb9 100644 --- a/src/mds/MDS.cc +++ b/src/mds/MDS.cc @@ -1551,6 +1551,10 @@ void MDS::handle_mds_recovery(int who) void MDS::handle_mds_failure(int who) { + if (who == whoami) { + dout(5) << "handle_mds_failure for myself; not doing anything" << dendl; + return; + } dout(5) << "handle_mds_failure mds." << who << dendl; mdcache->handle_mds_failure(who);