From: Piotr Dałek Date: Fri, 20 Jan 2017 15:07:10 +0000 (+0100) Subject: OSDMonitor: clear jewel+ feature bits when talking to Hammer OSD X-Git-Tag: v10.2.6~15^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F13131%2Fhead;p=ceph.git OSDMonitor: clear jewel+ feature bits when talking to Hammer OSD During upgrade from Hammer to Jewel, when upgrading MONs first and OSDs last, Jewel MONs send OSDMaps with components in encoding version not encodable by Hammer OSDs, generating extra load on MONs due to requests for full OSDMap after failing the CRC check. Fix this by not including CEPH_FEATURE_NEW_OSDOP_ENCODING (which is responsible for encoding pg_pool_t in version 24 instead of 21) and CEPH_FEATURE_CRUSH_TUNABLES5 (responsible for adding chooseleaf_stable field into encoded CRUSH map) when CEPH_OSDMAP_REQUIRE_JEWEL flag is not present. Note that this issue applies only to upgrade from Hammer to Jewel, because direct upgrade from Hammer to any other later release is not supported. For that reason, there is no need to have this patch in any release other than Jewel. Fixes: http://tracker.ceph.com/issues/18582 Signed-off-by: Piotr Dałek --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index b9cdc4d86023..658914eaeb4a 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -1215,7 +1215,9 @@ void OSDMonitor::encode_pending(MonitorDBStore::TransactionRef t) // determine appropriate features if (!tmp.test_flag(CEPH_OSDMAP_REQUIRE_JEWEL)) { dout(10) << __func__ << " encoding without feature SERVER_JEWEL" << dendl; - features &= ~CEPH_FEATURE_SERVER_JEWEL; + features &= ~(CEPH_FEATURE_SERVER_JEWEL | + CEPH_FEATURE_NEW_OSDOP_ENCODING | + CEPH_FEATURE_CRUSH_TUNABLES5); } dout(10) << __func__ << " encoding full map with " << features << dendl;