]> 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:44 +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 1cbcaa9f4b0ee31c65aff105a270a3c5213d00bf..77791df65552c7d2d84439d3cf7d908773ca8915 100644 (file)
@@ -3312,6 +3312,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") {