]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/MDSMonitor.cc: fix join fscid not applied with pending fsmap at boot
authorZhi Zhang <willzzhang@tencent.com>
Thu, 4 Feb 2021 03:57:26 +0000 (11:57 +0800)
committerPatrick Donnelly <pdonnell@redhat.com>
Mon, 16 Aug 2021 21:12:40 +0000 (14:12 -0700)
Fixes: https://tracker.ceph.com/issues/49157
Signed-off-by: Zhi Zhang <zhangz.david@outlook.com>
(cherry picked from commit 4ab87e2eecbdcb4932775e871c3ae2f793880c20)

src/mon/MDSMonitor.cc

index fca12925240f0b793bd466030dff493dff5bbb7a..ce542c4d8df6a4f30e20e7d29568ed2341841400 100644 (file)
@@ -673,7 +673,6 @@ bool MDSMonitor::prepare_beacon(MonOpRequestRef op)
       new_info.mds_features = m->get_mds_features();
       new_info.state = MDSMap::STATE_STANDBY;
       new_info.state_seq = seq;
-      pending.insert(new_info);
       if (m->get_fs().size()) {
        fs_cluster_id_t fscid = FS_CLUSTER_ID_NONE;
        auto f = pending.get_filesystem(m->get_fs());
@@ -682,6 +681,7 @@ bool MDSMonitor::prepare_beacon(MonOpRequestRef op)
        }
         new_info.join_fscid = fscid;
       }
+      pending.insert(new_info);
     }
 
     // initialize the beacon timer