]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: standy-replay mds remained in the "resolve" state after restart the active mds 37179/head
authorWei Qiaomiao <wei.qiaomiao@zte.com.cn>
Fri, 14 Aug 2020 17:37:56 +0000 (01:37 +0800)
committerPatrick Donnelly <pdonnell@redhat.com>
Wed, 16 Sep 2020 03:32:00 +0000 (20:32 -0700)
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>
(cherry picked from commit a786d2543cddcd1e4fbb7a574b76c3a30ddbf512)

src/mds/MDSRank.cc

index 9ddd1246af0438352df24e2cc18530421068148d..35c43399aa83acd5833b5eee7a6827bbdb4a5bad 100644 (file)
@@ -1683,8 +1683,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
   Context *fin = new C_IO_Wrapper(this, new C_MDS_BootStart(this, MDS_BOOT_INITIAL));
   bool const ready = objecter->wait_for_map(
@@ -1853,6 +1851,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);
 }