From 20e5bff7fc4ba629633c3d53ad4d72818a86b29b Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 11 Apr 2017 22:35:32 -0400 Subject: mon/OSDMonitor: fix initial map when require_luminous_osds not set on mkfs If we don't set the luminous flag, we should not set the new luninous fields or else we'll get a crc mismatch. (Funnily that happens in the epoch where the flag is eventually set and the encoded map finally includes the field we have set in memory.) Signed-off-by: Sage Weil --- src/mon/OSDMonitor.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mon') diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 9731e73e692..473a64a1e03 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -159,11 +159,11 @@ void OSDMonitor::create_initial() // new cluster should require latest by default newmap.set_flag(CEPH_OSDMAP_REQUIRE_JEWEL); newmap.set_flag(CEPH_OSDMAP_REQUIRE_KRAKEN); - if (!g_conf->mon_debug_no_require_luminous) + if (!g_conf->mon_debug_no_require_luminous) { newmap.set_flag(CEPH_OSDMAP_REQUIRE_LUMINOUS); - - newmap.full_ratio = g_conf->mon_osd_full_ratio; - newmap.nearfull_ratio = g_conf->mon_osd_nearfull_ratio; + newmap.full_ratio = g_conf->mon_osd_full_ratio; + newmap.nearfull_ratio = g_conf->mon_osd_nearfull_ratio; + } // encode into pending incremental newmap.encode(pending_inc.fullmap, -- cgit v1.2.3