]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/MgrMonitor: send mgr beacons to leader 14374/head
authorSage Weil <sage@redhat.com>
Fri, 7 Apr 2017 14:21:46 +0000 (10:21 -0400)
committerSage Weil <sage@redhat.com>
Fri, 7 Apr 2017 14:21:46 +0000 (10:21 -0400)
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 <sage@redhat.com>
src/mon/MgrMonitor.cc

index 97a75eb8a74b74ba51e3f229c8d351b2e30e5a25..29fd9a66f16bb64a48c612cd6747a4b2406b113a 100644 (file)
@@ -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;
 }