From: Sage Weil Date: Sat, 5 Apr 2014 23:58:55 +0000 (-0700) Subject: mon: wait for quorum for MMonGetVersion X-Git-Tag: v0.67.8~11 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=051a17eb008d75aa6b0737873318a2e7273501ab;p=ceph.git mon: wait for quorum for MMonGetVersion We should not respond to checks for map versions when we are in the probing or electing states or else clients will get incorrect results when they ask what the latest map version is. Fixes: #7997 Signed-off-by: Sage Weil (cherry picked from commit 67fd4218d306c0d2c8f0a855a2e5bf18fa1d659e) --- diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 25e063fee8638..eedb95bbb44bc 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -3272,6 +3272,12 @@ void Monitor::handle_get_version(MMonGetVersion *m) return; } + if (!is_leader() && !is_peon()) { + dout(10) << " waiting for quorum" << dendl; + waitfor_quorum.push_back(new C_RetryMessage(this, m)); + return; + } + MMonGetVersionReply *reply = new MMonGetVersionReply(); reply->handle = m->handle; if (m->what == "mdsmap") {