From: Greg Farnum Date: Thu, 11 Nov 2021 20:20:11 +0000 (+0000) Subject: mon: MonMap: do not increase mon_info_t's compatv in stretch mode, for real X-Git-Tag: v16.2.7~14^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F43971%2Fhead;p=ceph.git mon: MonMap: do not increase mon_info_t's compatv in stretch mode, for real This was supposed to be fixed a year ago in commit 2e3643647bfbe955b54c62c8aaf114744dedb86e, but it set compat_v to 4 instead of all the way back to 1 as it should have. Our testing for stretch mode in these areas is just not very thorough -- the kernel only supports compat_v 1 and apparently nobody's noticed the issue since then? :/ As the prior commit says, you can't set locations without being gated on a server feature bit, so simply cancelling this enforcement is completely safe. Fixes: https://tracker.ceph.com/issues/53237 Signed-off-by: Greg Farnum (cherry picked from commit ccb1b7eb8baf5f222109e77c168db39e699b6934) --- diff --git a/src/mon/MonMap.cc b/src/mon/MonMap.cc index 14700ec1f6cc..fbbcd23da0e4 100644 --- a/src/mon/MonMap.cc +++ b/src/mon/MonMap.cc @@ -42,10 +42,10 @@ void mon_info_t::encode(ceph::buffer::list& bl, uint64_t features) const uint8_t min_v = 1; if (!crush_loc.empty()) { // we added crush_loc in version 5, but need to let old clients decode it - // so just leave the min_v at version 4. Monitors are protected + // so just leave the min_v at version 1. Monitors are protected // from misunderstandings about location because setting it is blocked // on FEATURE_PINGING - min_v = 4; + min_v = 1; } if (!HAVE_FEATURE(features, SERVER_NAUTILUS)) { v = 2;