From: Somnath Roy Date: Wed, 2 Jul 2014 18:51:38 +0000 (-0700) Subject: OSD: adjust share_map() to handle the case that the osd is down X-Git-Tag: v0.84~153^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fde99e699fc45a5b0df1dbe5019f594a4cc87a40;p=ceph.git 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 --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index d3b496f69a6c..3b20540f53f1 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);