From: Kefu Chai Date: Mon, 3 Apr 2017 07:05:57 +0000 (+0800) Subject: mon/OSDMonitor: only check last_osd_report if the whole cluster is luminous X-Git-Tag: v12.0.2~186^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a521b13a6876e7dec79853fa064d7a2b699b40cc;p=ceph.git mon/OSDMonitor: only check last_osd_report if the whole cluster is luminous if a peon is not luminous, it won't forward the beacon message. if any OSD is not luminous, it won't report to mon with beacon messages. so, we can trust the OSDMonitor::last_osd_report only if the whole cluster is luminous. Signed-off-by: Kefu Chai --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 543338bdf3d..b38b46008f3 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -3303,8 +3303,13 @@ void OSDMonitor::tick() bool do_propose = false; utime_t now = ceph_clock_now(); - if (handle_osd_timeouts(now, last_osd_report)) - do_propose = true; + if (osdmap.test_flag(CEPH_OSDMAP_REQUIRE_LUMINOUS) && + mon->monmap->get_required_features().contains_all( + ceph::features::mon::FEATURE_LUMINOUS)) { + if (handle_osd_timeouts(now, last_osd_report)) { + do_propose = true; + } + } // mark osds down? if (check_failures(now))