From: Sage Weil Date: Wed, 20 Jun 2018 21:48:45 +0000 (-0500) Subject: mon/HealthMonitor: do not send MMonHealthChecks to pre-luminous mon X-Git-Tag: v12.2.8~21^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F22655%2Fhead;p=ceph.git mon/HealthMonitor: do not send MMonHealthChecks to pre-luminous mon 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 --- diff --git a/src/mon/HealthMonitor.cc b/src/mon/HealthMonitor.cc index e9e5ad3aa4a..fdd398c9d5c 100644 --- a/src/mon/HealthMonitor.cc +++ b/src/mon/HealthMonitor.cc @@ -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;