From b92fe4ee9477485b0b1ca16d02a64c3eb40cf38f Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 16 Jun 2017 12:59:39 -0400 Subject: [PATCH] osd: do not try to boot until we've seen the first osdmap This is actually not a change in behavior *except* we see this message instead of 2017-06-15 18:05:29.760938 24a7f700 -1 osd.1 0 osdmap SORTBITWISE OSDMap flag is NOT set; please set it because the OSDMap() epoch 0 does not have SORTBITWISE. Signed-off-by: Sage Weil --- src/osd/OSD.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 233104a8bc94..aef67ca491a4 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -5607,7 +5607,9 @@ void OSD::_preboot(epoch_t oldest, epoch_t newest) heartbeat(); // if our map within recent history, try to add ourselves to the osdmap. - if (osdmap->test_flag(CEPH_OSDMAP_NOUP)) { + if (osdmap->get_epoch() == 0) { + derr << "waiting for initial osdmap" << dendl; + } else if (osdmap->test_flag(CEPH_OSDMAP_NOUP)) { derr << "osdmap NOUP flag is set, waiting for it to clear" << dendl; } else if (!osdmap->test_flag(CEPH_OSDMAP_SORTBITWISE)) { derr << "osdmap SORTBITWISE OSDMap flag is NOT set; please set it" -- 2.47.3