]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix off-by-one is boot subscription 1298/head
authorSage Weil <sage@inktank.com>
Sat, 22 Feb 2014 16:08:37 +0000 (08:08 -0800)
committerSage Weil <sage@inktank.com>
Sat, 22 Feb 2014 16:08:37 +0000 (08:08 -0800)
If we have osdmap N, we want to onetime subscribe
starting at N+1.  Among other things, it means we
hear when the NOUP flag is cleared.

This appears to have broken somewhere around
3c76b81f2f96b790b72f2088164ed8e9d5efbba1.

Fixes: #7511
Signed-off-by: Sage Weil <sage@inktank.com>
src/osd/OSD.cc

index cb132ba77ff0445f80650f5ca554263ec79ea75e..74be486186783ed63abaa80e9bb1a5c234fc4f4d 100644 (file)
@@ -3576,7 +3576,7 @@ void OSD::_maybe_boot(epoch_t oldest, epoch_t newest)
   
   // get all the latest maps
   if (osdmap->get_epoch() > oldest)
-    osdmap_subscribe(osdmap->get_epoch(), true);
+    osdmap_subscribe(osdmap->get_epoch() + 1, true);
   else
     osdmap_subscribe(oldest - 1, true);
 }