]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: send mgrdigest promptly to new active mgr
authorJohn Spray <john.spray@redhat.com>
Thu, 29 Jun 2017 13:34:04 +0000 (09:34 -0400)
committerJohn Spray <john.spray@redhat.com>
Tue, 4 Jul 2017 23:07:58 +0000 (19:07 -0400)
Previously, active mgrs ended up waiting around
until the next periodic message.  This is a lot
more noticeable now that the mgr isn't considered
active until it has loaded the digest data.

Signed-off-by: John Spray <john.spray@redhat.com>
src/mon/MgrMonitor.cc

index f7cfd67a64e6c4ce6f1d93220a019abcb3c54a1e..9f65531fc14ccd0feadff1e77d732a18b7c0a555 100644 (file)
@@ -483,6 +483,10 @@ void MgrMonitor::drop_active()
   pending_map.active_gid = 0;
   pending_map.available = false;
   pending_map.active_addr = entity_addr_t();
+
+  // So that when new active mgr subscribes to mgrdigest, it will
+  // get an immediate response instead of waiting for next timer
+  cancel_timer();
 }
 
 void MgrMonitor::drop_standby(uint64_t gid)