From e48301c5cff2c7733f619880ba81a8e5eab810e8 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 1 Feb 2019 11:09:42 -0600 Subject: [PATCH] mon/MonClient: request monmap on open instead of ping 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 --- src/mon/MonClient.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mon/MonClient.cc b/src/mon/MonClient.cc index 3ed28052f5e..74a1891b0b2 100644 --- a/src/mon/MonClient.cc +++ b/src/mon/MonClient.cc @@ -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; } -- 2.39.5