From 6ca733ac8d1df4f237dc7026106701d6c85d9507 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 7 Apr 2017 10:21:46 -0400 Subject: [PATCH] mon/MgrMonitor: send mgr beacons to leader The leader has the last_beacon map that matters; make sure all beacons go there. At the same time drop the somewhat redundant checks in preprocess_beaon and just send *everything* to prepare_beacon, which is smart enough to do no update if there is none. Fixes: http://tracker.ceph.com/issues/19502 Signed-off-by: Sage Weil --- src/mon/MgrMonitor.cc | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/mon/MgrMonitor.cc b/src/mon/MgrMonitor.cc index 97a75eb8a74b..29fd9a66f16b 100644 --- a/src/mon/MgrMonitor.cc +++ b/src/mon/MgrMonitor.cc @@ -156,24 +156,11 @@ bool MgrMonitor::preprocess_beacon(MonOpRequestRef op) dout(4) << "beacon from " << m->get_gid() << dendl; if (!check_caps(op, m->get_fsid())) { + // drop it on the floor return true; } - last_beacon[m->get_gid()] = ceph_clock_now(); - - if (pending_map.active_gid == m->get_gid() - && pending_map.active_addr == m->get_server_addr() - && pending_map.get_available() == m->get_available()) { - dout(4) << "Daemon already active in map" << dendl; - return true; - } - - if (pending_map.standbys.count(m->get_gid()) > 0 - && pending_map.active_gid != 0) { - dout(4) << "Daemon already standby in map" << dendl; - return true; - } - + // always send this to the leader's prepare_beacon() return false; } -- 2.47.3