]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: wait for quorum for MMonGetVersion 1607/head
authorSage Weil <sage@inktank.com>
Sat, 5 Apr 2014 23:58:55 +0000 (16:58 -0700)
committerSage Weil <sage@inktank.com>
Sat, 5 Apr 2014 23:58:55 +0000 (16:58 -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>
src/mon/Monitor.cc

index c767a89d7a19eba60cf963b4527bd096c671c094..7e29e14cd2f5d6f6b6e223fa626e2e4ee8bb27de 100644 (file)
@@ -3493,6 +3493,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") {