From: Patrick Donnelly Date: Thu, 25 Jun 2020 23:46:51 +0000 (-0700) Subject: mon/MDSMonitor: copy MDS info which may be removed X-Git-Tag: v16.1.0~1879^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f8aaf9500e01b3dd3923b2ce89d2365bfe73dc51;p=ceph.git mon/MDSMonitor: copy MDS info which may be removed Otherwise the log entry will contain garbage (and crash the mgr). Fixes: https://tracker.ceph.com/issues/46216 Signed-off-by: Patrick Donnelly --- diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index 738b490d9fc2..2d5730cd7352 100644 --- a/src/mon/MDSMonitor.cc +++ b/src/mon/MDSMonitor.cc @@ -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);