Bug #75563
closedDown-level OSDs can be added to a cluster after an upgrade is complete
0%
Description
Steps to recreate:
1) Create a squid cluster
2) Upgrade to tentacle
3) Set require_osd_release to tentacle
4) Add a new squid OSD to the cluster
I was expecting step 4 to be blocked, however what I saw was it was allowed to be added, come up and in and join the cluster without issue and even have shards placed on it from existing umbrella pools. I have some scripts created by AI which I used to test this behaviour that I have attached.
Here is a view of the state of the cluster showing the state I managed to reach:
[root@jonathanbailey1ibmcom-san-ceph2-centos9-fulllatest build]# ceph osd dump | grep require_osd_release
require_osd_release tentacle
[root@jonathanbailey1ibmcom-san-ceph2-centos9-fulllatest build]# ceph versions
{
"mon": {
"ceph version 20.3.0-6157-g906949d3dc8 (906949d3dc8345aa5edfd4cf368e1cc0809cffef) tentacle (dev - Debug)": 3
},
"mgr": {
"ceph version 20.3.0-6157-g906949d3dc8 (906949d3dc8345aa5edfd4cf368e1cc0809cffef) tentacle (dev - Debug)": 1
},
"osd": {
"ceph version 19.2.3-708-g4d915ea919c (4d915ea919c6ba63ae66a413b1ffa6a887ac67c8) squid (stable)": 1,
"ceph version 20.3.0-6157-g906949d3dc8 (906949d3dc8345aa5edfd4cf368e1cc0809cffef) tentacle (dev - Debug)": 6
},
"overall": {
"ceph version 19.2.3-708-g4d915ea919c (4d915ea919c6ba63ae66a413b1ffa6a887ac67c8) squid (stable)": 1,
"ceph version 20.3.0-6157-g906949d3dc8 (906949d3dc8345aa5edfd4cf368e1cc0809cffef) tentacle (dev - Debug)": 10
}
}
Attached to this ticket is a script I used to reach this state. No flags such as --force or --yes-i-really-mean-it were needed as part of this.
Files
BS Updated by Bill Scales 9 months ago
At step 3 when require_osd_release is set there is rigorous checking that both the OSDs and MONs are at least at this level.
When OSDs are added at step 4 I think it is OSDMonitor::preprocess_boot that should be disallowing OSDs that do not meet the level set by require_osd_release to join the cluster. There is already checking there to prevent OSDs that are running code more than 3 releases newer than require_osd_release from joining, but no check to
disallow OSDs running older code. I think the fix is to add a block here, which like the existing blocks should generate an info cluster log if the OSD boot is disallowed.
Completely blocking downgrades of OSDs might be too restrictive - in emergencies there might be a valid reason to try and do this downgrade (although in some cases a downgrade will never be safe after letting the code use new features). There is no CLI involved in booting an OSD, so nowhere we can override this block. Perhaps we should add the block but then also allow require_osd_release to be reduced with a sufficient number of yes-i-really-mean-it overrides?
LF Updated by Laura Flores 8 months ago
Bump up
@Bill Scales is this one assigned to anyone?
RZ Updated by Radoslaw Zarzynski 8 months ago
I think the fix is to add a block here, which like the existing blocks should generate an info cluster log if the OSD boot is disallowed.
+1.
LF Updated by Laura Flores 8 months ago
Bump up
BS Updated by Bill Scales 8 months ago
- Assignee set to Jonathan Bailey
Jon, can you look at coding a fix for this. Look at OSDMonitor::preprocess_boot and add the missing checks for:
- m->osd_features does not have SERVER_UMBRELLA but osdmap.require_osd_release >= ceph_release_t::umbrella
- m->osd_features does not have SERVER_TENTACLE but osdmap.require_osd_release >= ceph_release_t::tentacle
It's probably more user friendly to check for umbrella first. Like the existing checks there should be an info message added to clog explaining why the OSD isn't allowed to boot
JB Updated by Jonathan Bailey 8 months ago
@Bill Scales sure thing, I will put it on my todo list
RZ Updated by Radoslaw Zarzynski 8 months ago
- Status changed from New to In Progress
LF Updated by Laura Flores 8 months ago
Bump up
LF Updated by Laura Flores 7 months ago
@Bill Scales how severe is this issue?
BS Updated by Bill Scales 7 months ago ยท Edited
how severe is this issue?
In practice this isn't something that people are likely to do, you can't increase require_osd_release if there are any OSDs down without --yes-i-really-mean-it and it checks that all the OSDs meet the new level. You would therefore either need to force this and then power up a down-level OSD, or try adding a new down-level OSD to your cluster. If you are using cephadm to do upgrades and add OSDs it won't let you do either of these.
However if you do manage to do this the consequences are horrible - at best you'll end up with looping OSD crashes (could be random OSDs) and at worst you'll damage the data/metadata stored on the OSDs and/or return bad data to clients. Using new features in the release increases the chance of these outcomes, but avoiding use of new features doesn't preclude these outcomes.
This isn't a new issue - the code has been like this for years, so we can survive a bit longer
@Bill Scales thanks for the context. Do you think we should mark the priority for this issue as "high"? If we do that, we will continue to regularly monitor this issue for updates in the bug scrub.
But if you don't think it needs much monitoring, or if there isn't a definitive ETA for fixing it, we can leave the priority as is.
JB Updated by Jonathan Bailey 7 months ago
Pull request is available for review here: https://github.com/ceph/ceph/pull/68773
RZ Updated by Radoslaw Zarzynski 7 months ago
- Pull request ID set to 68773
RZ Updated by Radoslaw Zarzynski 7 months ago
- Status changed from In Progress to Fix Under Review
LF Updated by Laura Flores 7 months ago
PR is still under review.
RZ Updated by Radoslaw Zarzynski 6 months ago
Still under review.
LF Updated by Laura Flores 6 months ago
Added some context about our upgrade test coverage to the PR: https://github.com/ceph/ceph/pull/68773#issuecomment-4595950833
UB Updated by Upkeep Bot 19 days ago
- Status changed from Fix Under Review to Resolved
- Merge Commit set to 335a1a720a12701f63dfbd298ec2dbae4e5d88b3
- Fixed In set to v22.0.0-863-g335a1a720a
- Upkeep Timestamp set to 2026-11-13T15:17:52+00:00
AA Updated by Alex Ainscow 16 days ago
- Status changed from Resolved to Pending Backport
- Backport set to umbrella
Requesting a backport to umbrella: the EC stretch cluster work (https://github.com/ceph/ceph/pull/72643) depends on this fix.
AA Updated by Alex Ainscow 16 days ago
- Copied to Backport #83203: umbrella: Down-level OSDs can be added to a cluster after an upgrade is complete added
UB Updated by Upkeep Bot 16 days ago
- Status changed from Pending Backport to Backporting
- Upkeep Timestamp changed from 2026-11-13T15:17:52+00:00 to 2026-11-16T08:36:44+00:00