]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/HealthMonitor: do not send MMonHealthChecks to pre-luminous mon 22655/head
authorSage Weil <sage@redhat.com>
Wed, 20 Jun 2018 21:48:45 +0000 (16:48 -0500)
committerSage Weil <sage@redhat.com>
Thu, 26 Jul 2018 21:44:05 +0000 (16:44 -0500)
During upgrade, we start doing the new health check code, but if we are
not the leader we can't send the new MMonHealthChecks message to the leader
or else it will crash.

This fix goes directly into the luminous branch since post-luminous code
does not have this compatibility issue.

Fixes: http://tracker.ceph.com/issues/24481
Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/HealthMonitor.cc

index e9e5ad3aa4a23c55fbba507f0e536e9e35499ee5..fdd398c9d5ccc6a614e9816845cfae2ebae9819b 100644 (file)
@@ -298,9 +298,12 @@ bool HealthMonitor::check_member_health()
     quorum_checks[mon->rank] = next;
     changed = true;
   } else {
-    // tell the leader
-    mon->messenger->send_message(new MMonHealthChecks(next),
-                                 mon->monmap->get_inst(mon->get_leader()));
+    // tell the leader, but only if the quorum is luminous
+    if (mon->quorum_mon_features.contains_all(
+         ceph::features::mon::FEATURE_LUMINOUS)) {
+      mon->messenger->send_message(new MMonHealthChecks(next),
+                                  mon->monmap->get_inst(mon->get_leader()));
+    }
   }
 
   return changed;