]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: osdmap: do not assert target_v when encoding in stretch mode 38531/head
authorGreg Farnum <gfarnum@redhat.com>
Fri, 8 Jan 2021 22:17:07 +0000 (22:17 +0000)
committerGreg Farnum <gfarnum@redhat.com>
Fri, 8 Jan 2021 22:17:07 +0000 (22:17 +0000)
Again, this was an overly-strict safety check. It passed testing against
(even old) userspace clients, but the kernel clients don't have all the
same feature bits and so when encoding for them, we see lower target_v values
and assert out erroneously.

As before, monitors and OSDs that actually need to interpret this data
are gated on cluster entry, so we don't need this safety check here.

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

index 6742352fb127874044e60f6dd0253d6421955f0c..10bfd47b2253c8bcaeed50b155c08b6cf3b2d43f 100644 (file)
@@ -3033,7 +3033,6 @@ void OSDMap::encode(ceph::buffer::list& bl, uint64_t features) const
       target_v = 6;
     }
     if (stretch_mode_enabled) {
-      ceph_assert(target_v >= 9);
       target_v = std::max((uint8_t)10, target_v);
     }
     ENCODE_START(target_v, 1, bl); // extended, osd-only data