From fde99e699fc45a5b0df1dbe5019f594a4cc87a40 Mon Sep 17 00:00:00 2001 From: Somnath Roy Date: Wed, 2 Jul 2014 11:51:38 -0700 Subject: [PATCH] OSD: adjust share_map() to handle the case that the osd is down The assert was hitting while OSd is waiting for becoming healthy in handle_osd_map(). This can happen while io is going on and OSDs are made down forcefully by say osd thrash command. So, the fix could be instead of asserting just return from here. Fixes: #8646 Signed-off-by: Somnath Roy --- src/osd/OSD.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index d3b496f69a6..3b20540f53f 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -4820,8 +4820,10 @@ void OSDService::share_map( << name << " " << con->get_peer_addr() << " " << epoch << dendl; - assert(osd->is_active() || - osd->is_stopping()); + if ((!osd->is_active()) && (!osd->is_stopping())) { + /*It is safe not to proceed as OSD is not in healthy state*/ + return; + } bool want_shared = should_share_map(name, con, epoch, osdmap, sent_epoch_p); -- 2.47.3