From: Sage Weil Date: Wed, 25 Jul 2012 17:58:28 +0000 (-0700) Subject: osd: fix map epoch boot condition X-Git-Tag: v0.48.1argonaut~35 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5979351ef3d3d03bced9286f79cbc22524c4a8de;p=ceph.git osd: fix map epoch boot condition We only want to join the cluster if we can catch up to the latest osdmap with a small number of maps, in this case a single map message. Backport: argonaut Signed-off-by: Sage Weil Reviewed-by: Yehuda Sadeh --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 1589dd331868..4c164446a8eb 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -2093,7 +2093,7 @@ void OSD::_got_boot_version(epoch_t oldest, epoch_t newest) if (osdmap->test_flag(CEPH_OSDMAP_NOUP)) { dout(5) << "osdmap NOUP flag is set, waiting for it to clear" << dendl; } else if (osdmap->get_epoch() >= oldest - 1 && - osdmap->get_epoch() < newest + g_conf->osd_map_message_max) { + osdmap->get_epoch() + g_conf->osd_map_message_max > newest) { send_boot(); return; }