]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mon/MonClient: request monmap on open instead of ping
authorSage Weil <sage@redhat.com>
Fri, 1 Feb 2019 17:09:42 +0000 (11:09 -0600)
committerSage Weil <sage@redhat.com>
Thu, 7 Feb 2019 18:10:34 +0000 (12:10 -0600)
The ping is useless.  The MMonGetMap ensures we get a monmap (and finish
authenticate()) before we get any other maps/messages, like mgr_map.
Getting other maps sooner rather than later can be confuse to MonClient
users because they will get dispatched MMgrMap before the authenticate()
call has returned.

Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/MonClient.cc

index 3ed28052f5e476eb19c67c8cd31e559c814881fd..74a1891b0b2bc895779e17830aec5a28a7118d3c 100644 (file)
@@ -17,6 +17,7 @@
 #include "include/scope_guard.h"
 #include "include/stringify.h"
 
+#include "messages/MMonGetMap.h"
 #include "messages/MMonGetVersion.h"
 #include "messages/MMonGetVersionReply.h"
 #include "messages/MMonMap.h"
@@ -1476,7 +1477,7 @@ void MonConnection::start(epoch_t epoch,
   if (con->get_peer_addr().is_msgr2()) {
     ldout(cct, 10) << __func__ << " opening mon connection" << dendl;
     state = State::AUTHENTICATING;
-    con->send_message(new MPing());
+    con->send_message(new MMonGetMap());
     return;
   }