]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon/OSDMonitor: drop osd_epoch of manually marked out osd
authorKefu Chai <kchai@redhat.com>
Mon, 23 Nov 2020 07:19:59 +0000 (15:19 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 23 Nov 2020 08:00:14 +0000 (16:00 +0800)
commit0ecef75210113ffba1b89c061cd470ee321d7a45
tree12c830e2c177b8c57215c010a2602e171a28091d
parentcf18f7e9cd5f5a95a0d70ef6fd10ab0ae36ee577
mon/OSDMonitor: drop osd_epoch of manually marked out osd

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>
src/mon/OSDMonitor.cc