From: Sage Weil Date: Sun, 5 Jan 2014 06:40:43 +0000 (-0800) Subject: osd: ignore OSDMap messages while we are initializing X-Git-Tag: v0.67.6~39 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=69a99e6edd67aadaea77fb5ebcf46190dbfcdbc6;p=ceph.git osd: ignore OSDMap messages while we are initializing The mon may occasionally send OSDMap messages to random OSDs, but is not very descriminating in that we may not have authenticated yet. Ignore any messages if that is the case; we will reqeust whatever we need during the BOOTING state. Fixes: #7093 Signed-off-by: Sage Weil (cherry picked from commit f68de9f352d53e431b1108774e4a23adb003fe3f) --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index e5f76377d9fa..c847faad8bf4 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -4934,6 +4934,11 @@ void OSD::handle_osd_map(MOSDMap *m) m->put(); return; } + if (is_initializing()) { + dout(0) << "ignoring osdmap until we have initialized" << dendl; + m->put(); + return; + } Session *session = static_cast(m->get_connection()->get_priv()); if (session && !(session->entity_name.is_mon() || session->entity_name.is_osd())) {