]> git-server-git.apps.pok.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>
Sun, 5 Jan 2014 06:44:56 +0000 (22:44 -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>
src/osd/OSD.cc

index 9622020d9b074f7ce9269596980e502a5219f7c3..7f221dda8516b8c213d6033d13ea614bbc396e02 100644 (file)
@@ -5030,6 +5030,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())) {