From: Kefu Chai Date: Thu, 3 Sep 2020 15:02:58 +0000 (+0800) Subject: mon/OSDMonitor: only take in osd into consideration when trimming osdmaps X-Git-Tag: v14.2.12~89^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F36982%2Fhead;p=ceph.git mon/OSDMonitor: only take in osd into consideration when trimming osdmaps we should not take down osd into consideration when trimming osdmap. in e62269c892, we decrease the upper bound of range of osdmaps to be trimmed if the given osd is out. but we should have to decrease it only if the osd in question is still *in*. so, in this change, the min_lec is decreased only if the osd in question is *in*. Fixes: https://tracker.ceph.com/issues/47290 Signed-off-by: Kefu Chai (cherry picked from commit 79175740cf2394bba74163ca8a5131419b9641ed) Conflicts: src/mon/OSDMonitor.cc - trivial resolution --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 36f8976bcb87..53c18e081cb9 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -2090,7 +2090,7 @@ epoch_t OSDMonitor::get_min_last_epoch_clean() const // don't trim past the oldest reported osd epoch for (auto& osd_epoch : osd_epochs) { if (osd_epoch.second < floor && - osdmap.is_out(osd_epoch.first)) { + osdmap.is_in(osd_epoch.first)) { floor = osd_epoch.second; } }