From fb10b84a6aa0a6ff3aaa31930d00a1ede6d0cbfb Mon Sep 17 00:00:00 2001 From: John Spray Date: Thu, 29 Jun 2017 09:34:04 -0400 Subject: [PATCH] mon: send mgrdigest promptly to new active mgr 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 --- src/mon/MgrMonitor.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mon/MgrMonitor.cc b/src/mon/MgrMonitor.cc index f7cfd67a64e..9f65531fc14 100644 --- a/src/mon/MgrMonitor.cc +++ b/src/mon/MgrMonitor.cc @@ -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) -- 2.47.3