summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Farnum <greg@inktank.com>2014-05-16 01:50:43 +0200
committerGreg Farnum <greg@inktank.com>2014-05-16 01:54:39 +0200
commit290ac818696414758978b78517b137c226110bb4 (patch)
tree30cfc49629175342e5a5bd7992c7ca63daa5d900
parentworkunits: provide some output in the dirfrag.sh test (diff)
downloadceph-290ac818696414758978b78517b137c226110bb4.tar.xz
ceph-290ac818696414758978b78517b137c226110bb4.zip
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 <greg@inktank.com> Reviewed-by: Samuel Just <sam.just@inktank.com>
-rw-r--r--src/osd/OSD.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc
index ead6ab15756..ebd85e7da6e 100644
--- a/src/osd/OSD.cc
+++ b/src/osd/OSD.cc
@@ -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);