]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mon/MDSMonitor: copy MDS info which may be removed
authorPatrick Donnelly <pdonnell@redhat.com>
Thu, 25 Jun 2020 23:46:51 +0000 (16:46 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 25 Jun 2020 23:56:25 +0000 (16:56 -0700)
Otherwise the log entry will contain garbage (and crash the mgr).

Fixes: https://tracker.ceph.com/issues/46216
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/mon/MDSMonitor.cc

index 738b490d9fc26b9da6f5061e11a4730db8a0cc10..2d5730cd735202592f05a53a2b7f45b4e84772ff 100644 (file)
@@ -2064,7 +2064,7 @@ bool MDSMonitor::check_health(FSMap& fsmap, bool* propose_osdmap)
   }
 
   for (const auto& gid : to_remove) {
-    auto& info = fsmap.get_info_gid(gid);
+    auto info = fsmap.get_info_gid(gid);
     const mds_info_t* rep_info = nullptr;
     if (info.rank >= 0) {
       auto fscid = fsmap.gid_fscid(gid);