]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds: standy-replay mds remained in the "resolve" state after restart the active mds
authorWei Qiaomiao <wei.qiaomiao@zte.com.cn>
Fri, 14 Aug 2020 17:37:56 +0000 (01:37 +0800)
committerWei Qiaomiao <wei.qiaomiao@zte.com.cn>
Sat, 15 Aug 2020 16:12:09 +0000 (00:12 +0800)
In multimds and standy-replay enabled Ceph cluster,after reduce a filesystem mds num and restart an active mds,
its standy-replay mds didn't enter into active state and remained in the "resolve" state.

Fixes: https://tracker.ceph.com/issues/46976
Signed-off-by: Wei Qiaomiao <wei.qiaomiao@zte.com.cn>
src/mds/MDSRank.cc

index 9a0e2a5390cea22332942c97161e3545c77f659a..36471e86c16a5170ddfeb6058ce47d695d7fdc58 100644 (file)
@@ -1715,8 +1715,6 @@ void MDSRank::replay_start()
   if (is_standby_replay())
     standby_replaying = true;
 
-  calc_recovery_set();
-
   // Check if we need to wait for a newer OSD map before starting
   bool const ready = objecter->with_osdmap(
     [this](const OSDMap& o) {
@@ -1892,6 +1890,8 @@ void MDSRank::resolve_start()
 
   reopen_log();
 
+  calc_recovery_set();
+
   mdcache->resolve_start(new C_MDS_VoidFn(this, &MDSRank::resolve_done));
   finish_contexts(g_ceph_context, waiting_for_resolve);
 }