From 91548a33ced2b2e3b2cbe2854b027c08d3a6cbee Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 20 Jul 2017 17:44:58 -0400 Subject: [PATCH] osd: bail out if no map yet If we get pings before finishing our startup we may not yet have an osdmap. Signed-off-by: Sage Weil --- src/osd/OSD.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 7a90a0a5faa..e0d3bd54abb 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -4699,7 +4699,11 @@ void OSD::handle_osd_ping(MOSDPing *m) } OSDMapRef curmap = service.get_osdmap(); - assert(curmap); + if (!curmap) { + heartbeat_lock.Unlock(); + m->put(); + return; + } switch (m->op) { -- 2.39.5