From f0a5c6351c391d4dc9324b9bdc4f7a72f2bc8117 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 20 Jun 2018 16:48:45 -0500 Subject: [PATCH] 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 --- src/mon/HealthMonitor.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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; -- 2.47.3