]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: only do timecheck with known monmap 1461/head
authorSage Weil <sage@inktank.com>
Fri, 14 Mar 2014 18:02:30 +0000 (11:02 -0700)
committerSage Weil <sage@inktank.com>
Fri, 14 Mar 2014 18:02:30 +0000 (11:02 -0700)
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 <sage@inktank.com>
src/mon/Monitor.cc

index 5697d0e97a5d1b0c12240eb4f8a06e2ddbfb5af3..a2d11120625b25ef35c520d1e827137e7d1b4b43 100644 (file)
@@ -1601,7 +1601,8 @@ void Monitor::win_election(epoch_t epoch, set<int>& active, uint64_t features,
   health_monitor->start(epoch);
 
   finish_election();
-  if (monmap->size() > 1)
+  if (monmap->size() > 1 &&
+      monmap->get_epoch() > 0)
     timecheck_start();
 }