]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mon/OSDMonitor: only take in osd into consideration when trimming osdmaps
authorKefu Chai <kchai@redhat.com>
Thu, 3 Sep 2020 15:02:58 +0000 (23:02 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 3 Sep 2020 15:03:00 +0000 (23:03 +0800)
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 <kchai@redhat.com>
src/mon/OSDMonitor.cc

index fc4bf04e12f0444e2cc9fc0b9fa5a60944e1dfbe..78a8b67cbf6806b1a925699cdc3e24832b5275f2 100644 (file)
@@ -2251,7 +2251,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 (epoch < floor &&
-        osdmap.is_out(osd)) {
+        osdmap.is_in(osd)) {
       floor = epoch;
     }
   }