]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: fix incorrect op between osd state and weight 44303/head
authorTongliang Deng <dengtongliang@gmail.com>
Tue, 14 Dec 2021 02:32:31 +0000 (10:32 +0800)
committerTongliang Deng <dengtongliang@gmail.com>
Wed, 15 Dec 2021 02:19:08 +0000 (10:19 +0800)
The cleanup in f994925908c720f8e0b3fda2f1fc51ef6e757de3 removes
osd_epochs if osd is marked out, but out status is not stored in
new_state, it is in new_weight. The osd_epochs of osd marked out
are handled properly in 0ecef75210113ffba1b89c061cd470ee321d7a45.
Thus we delete it.

Signed-off-by: Tongliang Deng <dengtongliang@gmail.com>
src/mon/OSDMonitor.cc

index b563e375092a6b41608063e1ed46605cc42c423a..a2f8f174970c2dbbdb8be62cf7724380d1ef58b1 100644 (file)
@@ -894,10 +894,6 @@ void OSDMonitor::update_from_paxos(bool *need_bootstrap)
        // could be marked up *or* down, but we're too lazy to check which
        last_osd_report.erase(osd);
       }
-      if (state & CEPH_OSD_OUT) {
-        // could be marked in *or* out, but we can safely drop it
-        osd_epochs.erase(osd);
-      }
     }
     for (const auto [osd, weight] : inc.new_weight) {
       if (weight == CEPH_OSD_OUT) {