this change addresses the regression introduced by
f994925908c720f8e0b3fda2f1fc51ef6e757de3.
in
f994925908c720f8e0b3fda2f1fc51ef6e757de3, instead of ignoring the
osd_epoch from non-in OSD, the osd_epochs from osds marked out using
CEPH_OSD_OUT in its osd_state are dropped once they are marked out.
but the change failed to take those OSDs which are marked out manually
into consideration. we mark them out by changing inc.new_weight to
CEPH_OSD_OUT. and mon-last-epoch-clean.sh marks osd.2 out manually for
testing osdmap trimming. hence we have the regression after that change.
in this change, the manually marked out OSDs are also considered, so
their osd_epochs are also dropped in OSDMonitor::update_from_paxos().
Fixes: https://tracker.ceph.com/issues/48320
Signed-off-by: Kefu Chai <kchai@redhat.com>
osd_epochs.erase(osd_state.first);
}
}
+ for (const auto [osd, weight] : inc.new_weight) {
+ if (weight == CEPH_OSD_OUT) {
+ // manually marked out, so drop it
+ osd_epochs.erase(osd);
+ }
+ }
}
if (t) {