From: Sage Weil Date: Fri, 7 Apr 2017 14:21:46 +0000 (-0400) Subject: mon/MgrMonitor: send mgr beacons to leader X-Git-Tag: v12.0.2~152^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6ca733ac8d1df4f237dc7026106701d6c85d9507;p=ceph.git 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 --- 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; }