]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: only check last_osd_report if the whole cluster is luminous 14294/head
authorKefu Chai <kchai@redhat.com>
Mon, 3 Apr 2017 07:05:57 +0000 (15:05 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 3 Apr 2017 07:11:48 +0000 (15:11 +0800)
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 <kchai@redhat.com>
src/mon/OSDMonitor.cc

index 543338bdf3d59673485cc04ed6c34023231264f5..b38b46008f317ecbc20fede8ce817c08a264cdc4 100644 (file)
@@ -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))