]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon/OSDMonitor: fix osd_epochs insertion on prepare_beacon()
authorMatan Breizman <mbreizma@redhat.com>
Sun, 24 Dec 2023 14:16:12 +0000 (14:16 +0000)
committerMykola Golub <mgolub@suse.com>
Fri, 1 Mar 2024 12:10:00 +0000 (14:10 +0200)
commita23d3aa962f8138f34340ecf2da9fd3624ea24e7
treee7008f2fd7924ed95e05c5a5f7141d034d4c6904
parent24e44a110ee1c0a9fe5bdb083f2cfa24742d9425
mon/OSDMonitor: fix osd_epochs insertion on prepare_beacon()

Previously, an OSD marked out could have been added back to the map upon new beacon sent by the OSD.
If the OSD goes down (after being added back to map) - it won't be marked as OUT again.
Therefore, `osd_epochs` would remain with a "stale" OSD, as a result OSDMonitor::get_min_last_epoch_clean() will always return the "stale" OSD epoch.

When osd is marked out, it will be erased from `osd_epochs` map. Correspondingly, it should be added back to the map **only** once it's marked in.

Fixes: https://tracker.ceph.com/issues/63883
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit dd1d30b7b209eaff376620ebd6b9a65df5ee7361)
src/mon/OSDMonitor.cc