Skip to content

Commit f1aa68d

Browse files
committed
mon: validate SERVER_REEF on set-require-min-compat-client
Unit testing ------------- ``` [rzarzynski@o06 build]$ bin/unittest_features ... [ RUN ] features.release_features 1 argonaut features 0x40000 looks like argonaut 2 bobtail features 0x40000 looks like argonaut 3 cuttlefish features 0x40000 looks like argonaut 4 dumpling features 0x42040000 looks like dumpling 5 emperor features 0x42040000 looks like dumpling 6 firefly features 0x20842040000 looks like firefly 7 giant features 0x20842040000 looks like firefly 8 hammer features 0x1020842040000 looks like hammer 9 infernalis features 0x1020842040000 looks like hammer 10 jewel features 0x401020842040000 looks like jewel 11 kraken features 0xc01020842040000 looks like kraken 12 luminous features 0xe01020842240000 looks like luminous 13 mimic features 0xe01020842240000 looks like luminous 14 nautilus features 0xe01020842240000 looks like luminous 15 octopus features 0xe01020842240000 looks like luminous 16 pacific features 0xe01020842240000 looks like luminous 17 quincy features 0xe01020842240000 looks like luminous 18 reef features 0xe010208d2240000 looks like reef 19 squid features 0xe010208d2240000 looks like reef [ OK ] features.release_features (0 ms) ``` Manual testing -------------- \### 'quincy` client connected to `main` cluster There was `ceph -w` from `quincy` running in the background. ``` [rzarzynski@o06 build]$ bin/ceph osd set-require-min-compat-client reef Error EPERM: cannot set require_min_compat_client to reef: 1 connected client(s) look like luminous (missing 0x80000000); add --yes-i-really-mean-it to do it anyway ``` \### Only `main` clients connected to `main` cluster ``` [rzarzynski@o06 build]$ bin/ceph osd get-require-min-compat-client luminous [rzarzynski@o06 build]$ bin/ceph daemon mon.a sessions | jq -jr '.[] | .name, "\t", .con_features, "\t", .con_features_hex, "\n"' | grep client client.? 4540701547738038271 3f03cffffffdffff client.? 4540701547738038271 3f03cffffffdffff [rzarzynski@o06 build]$ bin/ceph osd set-require-min-compat-client reef set require_min_compat_client to reef ``` Fixes: https://tracker.ceph.com/issues/61948 Signed-off-by: Radoslaw Zarzynski <[email protected]>
1 parent b494674 commit f1aa68d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/common/ceph_strings.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,11 @@ uint64_t ceph_release_features(int r)
153153
return req;
154154

155155
req |= CEPH_FEATUREMASK_CRUSH_CHOOSE_ARGS; // and overlaps
156-
if (r <= CEPH_RELEASE_LUMINOUS)
156+
if (r <= CEPH_RELEASE_QUINCY)
157+
return req;
158+
159+
req |= CEPH_FEATUREMASK_SERVER_REEF; // upmap-primary
160+
if (r <= CEPH_RELEASE_REEF)
157161
return req;
158162

159163
return req;

0 commit comments

Comments
 (0)