]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: do not go through handle_mds_failure for oneself
authorGreg Farnum <greg@inktank.com>
Wed, 3 Apr 2013 19:43:49 +0000 (12:43 -0700)
committerGreg Farnum <greg@inktank.com>
Wed, 3 Apr 2013 19:43:49 +0000 (12:43 -0700)
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 <greg@inktank.com>
Reviewed-by: Yan, Zheng <zheng.z.yan@intel.com>
src/mds/MDS.cc

index 1fa03039ecb7fcf4f31e274ebb8c62f6c583c916..3b3b2d6dc2eb9a5d5992409b289804d5ff254c67 100644 (file)
@@ -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);