Skip to content

Commit a3bdffb

Browse files
committed
src/osd/OSDMap.cc: Fix encoder to produce same bytestream
Fixes: https://tracker.ceph.com/issues/63389 Signed-off-by: Kamoltat <[email protected]>
1 parent d33af7d commit a3bdffb

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/osd/OSDMap.cc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -588,9 +588,9 @@ void OSDMap::Incremental::encode(ceph::buffer::list& bl, uint64_t features) cons
588588
v = 5;
589589
} else if (!HAVE_FEATURE(features, SERVER_NAUTILUS)) {
590590
v = 6;
591-
} /* else if (!HAVE_FEATURE(features, SERVER_REEF)) {
591+
} else if (!HAVE_FEATURE(features, SERVER_REEF)) {
592592
v = 8;
593-
} */
593+
}
594594
ENCODE_START(v, 1, bl); // client-usable data
595595
encode(fsid, bl);
596596
encode(epoch, bl);
@@ -3015,6 +3015,9 @@ bool OSDMap::primary_changed_broken(
30153015
uint64_t OSDMap::get_encoding_features() const
30163016
{
30173017
uint64_t f = SIGNIFICANT_FEATURES;
3018+
if (require_osd_release < ceph_release_t::reef) {
3019+
f &= ~CEPH_FEATURE_SERVER_REEF;
3020+
}
30183021
if (require_osd_release < ceph_release_t::octopus) {
30193022
f &= ~CEPH_FEATURE_SERVER_OCTOPUS;
30203023
}
@@ -3194,9 +3197,9 @@ void OSDMap::encode(ceph::buffer::list& bl, uint64_t features) const
31943197
v = 6;
31953198
} else if (!HAVE_FEATURE(features, SERVER_NAUTILUS)) {
31963199
v = 7;
3197-
} /* else if (!HAVE_FEATURE(features, SERVER_REEF)) {
3200+
} else if (!HAVE_FEATURE(features, SERVER_REEF)) {
31983201
v = 9;
3199-
} */
3202+
}
32003203
ENCODE_START(v, 1, bl); // client-usable data
32013204
// base
32023205
encode(fsid, bl);

src/osd/OSDMap.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,8 @@ class OSDMap {
570570
CEPH_FEATUREMASK_SERVER_LUMINOUS |
571571
CEPH_FEATUREMASK_SERVER_MIMIC |
572572
CEPH_FEATUREMASK_SERVER_NAUTILUS |
573-
CEPH_FEATUREMASK_SERVER_OCTOPUS;
573+
CEPH_FEATUREMASK_SERVER_OCTOPUS |
574+
CEPH_FEATUREMASK_SERVER_REEF;
574575

575576
struct addrs_s {
576577
mempool::osdmap::vector<std::shared_ptr<entity_addrvec_t> > client_addrs;

0 commit comments

Comments
 (0)