]> git.apps.os.sepia.ceph.com Git - ceph-ci.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)
committerZhi Zhang <willzzhang@tencent.com>
Thu, 4 Feb 2021 03:57:26 +0000 (11:57 +0800)
Fixes: https://tracker.ceph.com/issues/49157
Signed-off-by: Zhi Zhang <zhangz.david@outlook.com>
src/mon/MDSMonitor.cc

index 37941970f927a9391b6b1731b6e99604d74f2aa7..43ee0a3a473067e7d78c3045dfc152915b78c2f2 100644 (file)
@@ -665,7 +665,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());
@@ -674,6 +673,7 @@ bool MDSMonitor::prepare_beacon(MonOpRequestRef op)
        }
         new_info.join_fscid = fscid;
       }
+      pending.insert(new_info);
     }
 
     // initialize the beacon timer