From 5979351ef3d3d03bced9286f79cbc22524c4a8de Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 25 Jul 2012 10:58:28 -0700 Subject: [PATCH] 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 --- src/osd/OSD.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 1589dd3318689..4c164446a8eba 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; } -- 2.39.5