]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd: osdmap: Do not increase compatv when using stretch mode
authorGreg Farnum <gfarnum@redhat.com>
Tue, 8 Dec 2020 23:33:11 +0000 (23:33 +0000)
committerGreg Farnum <gfarnum@redhat.com>
Thu, 10 Dec 2020 14:35:15 +0000 (14:35 +0000)
commit151f473ee5242de1db4d5b88217b04c90234af79
treea2efbb8ddb31b4a48a29541ba0ae2ccf618aa12b
parent208957e6d99f1dfe83e5601f6db80a90a96b62cd
osd: osdmap: Do not increase compatv when using stretch mode

This is analagous to my monmap fix in 2e3643647bfbe955b54c62c8aaf114744dedb86e,
but for the OSDMap. I was previously trying to be safe by changing compat_v
when using stretch details. Unfortunately, older clients are trying to
interpret this data (even though its purpose is to be a cluster-only data
region! See https://tracker.ceph.com/issues/48489), and crashing as a result.

Because enabling stretch mode is blocked by all OSDs understanding it, and
OSDs which do not understand it are not allowed to boot once it's on,
we can simply remove the compat_v change.

This does leave the miniscule risk that somebody will enable stretch mode
and run with it, then turn it off, an old OSD will *then* connect to the
cluster, and maybe some bad peering choices will happen -- but I don't
see a lot of other choices and this scenario is so unlikely I don't
think it's worth worrying about.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
src/osd/OSDMap.cc