]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: wait for quorum for MMonGetVersion
authorSage Weil <sage@inktank.com>
Sat, 5 Apr 2014 23:58:55 +0000 (16:58 -0700)
committerSage Weil <sage@inktank.com>
Tue, 8 Apr 2014 03:55:37 +0000 (20:55 -0700)
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 <sage@inktank.com>
(cherry picked from commit 67fd4218d306c0d2c8f0a855a2e5bf18fa1d659e)

src/mon/Monitor.cc

index 25e063fee8638e05cdcfd036ca5ccc7a63294d79..eedb95bbb44bca6a6badaed3fea9fe1d3f8b8425 100644 (file)
@@ -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") {