]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: ignore OSDMap messages while we are initializing
authorSage Weil <sage@inktank.com>
Sun, 5 Jan 2014 06:40:43 +0000 (22:40 -0800)
committerSage Weil <sage@inktank.com>
Thu, 9 Jan 2014 01:09:12 +0000 (17:09 -0800)
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 <sage@inktank.com>
(cherry picked from commit f68de9f352d53e431b1108774e4a23adb003fe3f)

src/osd/OSD.cc

index e5f76377d9fa02ecc4f633de1ce9691350f3a92d..c847faad8bf4f82331f7254364eea1ef0675a81c 100644 (file)
@@ -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<Session *>(m->get_connection()->get_priv());
   if (session && !(session->entity_name.is_mon() || session->entity_name.is_osd())) {