]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
OSD: adjust share_map() to handle the case that the osd is down 2064/head
authorSomnath Roy <somnath.roy@sandisk.com>
Wed, 2 Jul 2014 18:51:38 +0000 (11:51 -0700)
committerSomnath Roy <somnath.roy@sandisk.com>
Wed, 2 Jul 2014 20:51:11 +0000 (13:51 -0700)
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 <somnath.roy@sandisk.com>
src/osd/OSD.cc

index d3b496f69a6c9bada7fd4f1f8338175a75750f80..3b20540f53f10b9d4c43f3853d505222bfc08a4d 100644 (file)
@@ -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);