From: Greg Farnum Date: Wed, 24 Apr 2013 22:27:23 +0000 (-0700) Subject: mon: be more careful about making sure we're up-to-date on sync check X-Git-Tag: v0.61~97^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fb8bad31056f40a3f3e5d6c7af43ec627904d75f;p=ceph.git mon: be more careful about making sure we're up-to-date on sync check We were looking at our own paxos_max_join_drift and using that to calculate whether we were new enough to join without syncing, but if those numbers don't match across monitors they might have trimmed. Use the number they provide us as their first version and compare to that as well. Signed-off-by: Greg Farnum --- diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 2338e9320ead..1ffe04b34bfb 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -1900,7 +1900,9 @@ void Monitor::handle_probe_reply(MMonProbe *m) if (m->quorum.size()) { dout(10) << " existing quorum " << m->quorum << dendl; - if (paxos->get_version() + g_conf->paxos_max_join_drift < m->paxos_last_version) { + if ((paxos->get_version() + g_conf->paxos_max_join_drift < + m->paxos_last_version) || + (paxos->get_version() < m->paxos_first_version)){ dout(10) << " peer paxos version " << m->paxos_last_version << " vs my version " << paxos->get_version() << " (too far ahead)"