From: Greg Farnum Date: Thu, 15 May 2014 23:50:43 +0000 (-0700) Subject: OSD: fix an osdmap_subscribe interface misuse X-Git-Tag: v0.80.2~50 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5c8afaa8861345efbcc5488e0336327a8a38d3bc;p=ceph.git OSD: fix an osdmap_subscribe interface misuse When calling osdmap_subscribe, you have to pass an epoch newer than the current map's. _maybe_boot() was not doing this correctly -- we would fail a check for being *in* the monitor's existing map range, and then pass along the map prior to the monitor's range. But if we were exactly one behind, that value would be our current epoch, and the request would get dropped. So instead, make sure we are not *in contact* with the monitor's existing map range. Signed-off-by: Greg Farnum Reviewed-by: Samuel Just (cherry picked from commit 290ac818696414758978b78517b137c226110bb4) --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index db20524997af..97586bd04043 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -3659,7 +3659,7 @@ void OSD::_maybe_boot(epoch_t oldest, epoch_t newest) } // get all the latest maps - if (osdmap->get_epoch() > oldest) + if (osdmap->get_epoch() + 1 >= oldest) osdmap_subscribe(osdmap->get_epoch() + 1, true); else osdmap_subscribe(oldest - 1, true);