]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
OSD: fix an osdmap_subscribe interface misuse
authorGreg Farnum <greg@inktank.com>
Thu, 15 May 2014 23:50:43 +0000 (16:50 -0700)
committerGreg Farnum <greg@inktank.com>
Thu, 15 May 2014 23:54:39 +0000 (16:54 -0700)
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 <greg@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
src/osd/OSD.cc

index ead6ab15756b19eb34bdf2c53d744bf1edfa9a73..ebd85e7da6e254c2cc2fbb174995f96d2497ed8c 100644 (file)
@@ -3752,7 +3752,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);