From f1bd59f84bca85542ad82d8f0923bbad994d7048 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 14 Mar 2014 11:02:30 -0700 Subject: [PATCH] mon: only do timecheck with known monmap If we are still on monmap epoch 0, our mon ranks cannot yet be trusted since there is not yet a shared source of truth from paxos. If we do timechecks, the code gets confused about the ranks in e.g. the timecheck_waiting map. Fixes: #7692 Signed-off-by: Sage Weil --- src/mon/Monitor.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 5697d0e97a5d..a2d11120625b 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -1601,7 +1601,8 @@ void Monitor::win_election(epoch_t epoch, set& active, uint64_t features, health_monitor->start(epoch); finish_election(); - if (monmap->size() > 1) + if (monmap->size() > 1 && + monmap->get_epoch() > 0) timecheck_start(); } -- 2.47.3