Repository navigation
Protect against down-level OSDs joining the cluster after upgrade - #68773
Conversation
|
jenkins test make check |
ljflores
left a comment
There was a problem hiding this comment.
@JonBailey1993 how can we best verify this fix?
I see you listed some manual steps in the tracker ticket, but I'm curious if we need to add an additional test to verify (i.e. in teuthology or in unit tests).
| goto ignore; | ||
| } | ||
|
|
||
| // We should not allow booting of pre-umbrella OSDs once you have set require_osd_release |
There was a problem hiding this comment.
I think I agree. However, there is a missed piece – the release-checklist must be extended.
There was a problem hiding this comment.
I did take a look at the release checklist when I made the PR. The lines above seem to come under the heading
- [x] search code for X-2 and X-3 (`CEPH_FEATURE_SERVER_*` and `ceph_release_t::*`)
which sounded like it applied to this as well, so I assumed an update to the checklist wasn't needed. If we want to explicitly call out modifying this exact function with these checks though, I can add something in. What do you think @rzarzynski ?
There was a problem hiding this comment.
I would prefer something more specific to the this file and method.
There was a problem hiding this comment.
Sure thing then, I will add a commit for the release checklist to this PR
There was a problem hiding this comment.
This should now be added
@ljflores I included a script in the tracker ticket too I think (if I'm wrong, I still have the script locally), which is what I used to verify this before I pushed. It's not really designed for teuthology at this point in time, but I suspect it could be turned into a standalone test or something in teuthology or something potentially - I'm not really sure on the architecture of teuthology currently so I'd have to find some time to learn and understand this before I could do this. |
How do we do this as a teuthology test? We need a mixture of OSDs running two different releases, but unlike the upgrade tests that use cephadm we would have to do this without cephadm because it won't let you create this scenario. So that either means we need to write a test that uses container images (like the upgrade test) but starts/stops OSD containers manually rather than using cephadm, or we need a way of get teuthology to install different RPMs on different nodes. Are there any upgrade tests that don't use cephadm that we could look at and use as a basis for this test? |
@bill-scales I recently went through a deep-dive of the upgrade tests to see which tests are containerized vs. bare metal. I found that the "normal stable release" upgrade tests (i.e. where the upgrade path is "tentacle --> main", "squid --> main", "squid --> tentacle") are all containerized. But the "point to point" upgrade tests (i.e. where the upgrade path is "v20.2.0 --> v20.2.1 --> tip of tentacle") are all bare metal. It seems like for this problem, you'd need to test a "normal stable release" upgrade path on bare metal. But all of these types of tests are containerized. However, you could potentially use the point-to-point tests as a basis to create a new test. You can see more about what we're testing in terms of upgrade paths in this doc (https://docs.google.com/document/d/1cF6Raroc_BeGBIj-LjnRzByRPqFhWVLc-LKyaVdyIzM/edit?usp=sharing) where we were checking our Rocky10 coverage. I hope this provides some better context. |
|
Thanks @ljflores for the pointers, that's exactly what we need @JonBailey1993 you should be able to write a teuthology test to do this using the install.upgrade task to upgrade a single node. Here is a sketch of what the test will look like, probably full of syntax errors and there's probably stuff missing in the ceph: section to make sure the cluster is created and started, and there's no check for the osd failing to start at the end. For more information see teuthology/task/install/init.py for more details about the install and install.upgrade tasks. I suspect you don't need to specify a tag on the install.upgrade if you just want it to pick up the latest main. See qa/tasks/ceph.py for more details about the ceph.stop and ceph.restart tasks. See also the expected-failure config setting in ceph.restart - you might be able to use this to check for the failure, although I think this is looking in the osd log file, not the mon or cluster log. |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
|
How have you seen this happen? The scenario that comes to mind is a host that's down during the upgrade and subsequently repaired and booted. In this scenario, how would one upgrade those OSDs so they could rejoin? Would the devices have to be zapped and new OSDs deployed? In the tracker I'm uncertain how "Add a new squid OSD to the cluster" would be done, other than by manually specifying a Squid container image, which I guess could happen inadvertently. Maybe this should raise a health warning so someone running into it doesn't wonder why the OSD won't come up/in? |
It was artificially created through testing to check for holes in our upgrade process. In the test it was just done by launching a downlevel OSD process, none of the test was orchestrated through cephadm or anything.
I'd be happy to do this, I can add this. |
Awesome. I could see myself blowing a couple of frustrating hours trying to figure it out, and like to spare others that potential. |
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
|
This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution! |
|
Still need to close this window, hopefully its very unlikely to occur in practice but if it does it then can cause serious damage to your data. |
dd6290b to
f8d9953
Compare
|
(claude response) Pushed on behalf of Alex Ainscow: rebased onto main, with your two commits unchanged, plus one commit on top, "mon/OSDMonitor: refuse the boot of OSDs older than any require_osd_release" (f8d9953). The per-release checks missed Vampire, which is now on main, and each later release would need another. This replaces them with one check keyed on |
Carried from ceph#68773; drop when this is rebased onto a main that has it. Currently it is still possible for a downlevel OSD to join the cluster, as explained in https://tracker.ceph.com/issues/75563. This commit adds protections to prevent this being possible. by making it so that downlevel OSDs get rejected from the cluster after you raise the require-osd-release flag. This is necissairy as some features use this flag as a gate to decide on whether to enable new features of not. If a feature changes metadata assuming all OSDs are at the required level, its possible to add a new downlevel after this fact and cause corruption as the downlevel OSD won't be able to understand the new feature. The flag cannot be switched until all OSDs are uplevel, but once its switched it doesn't protect against new downlevel OSDs are added. This adds in the missing piece of protection. Signed-off-by: Jon Bailey <[email protected]>
…dd pre-X level OSDs after require_osd_release is set. Carried from ceph#68773; drop when this is rebased onto a main that has it. Signed-off-by: Jon Bailey <[email protected]>
…e_osd_release Carried from ceph#68773; drop when this is rebased onto a main that has it. The boot checks keyed on require_osd_release named squid, tentacle and umbrella, so after 'ceph osd require-osd-release vampire' an Umbrella OSD could still boot, and each later release would need another check that its kickoff could forget. The squid and tentacle ones are already covered by the N-2 lower bound. Refuse an OSD that lacks the SERVER_* feature of require_osd_release, looked up by a new ceph_release_server_feature(). unittest_features fails while the release being built has no feature there, which the release checklist now names instead of a per-release check. Fixes: https://tracker.ceph.com/issues/75563 Assisted-by: Claude Code Signed-off-by: Alex Ainscow <[email protected]>
Carried from ceph#68773; drop when this is rebased onto a main that has it. Currently it is still possible for a downlevel OSD to join the cluster, as explained in https://tracker.ceph.com/issues/75563. This commit adds protections to prevent this being possible. by making it so that downlevel OSDs get rejected from the cluster after you raise the require-osd-release flag. This is necissairy as some features use this flag as a gate to decide on whether to enable new features of not. If a feature changes metadata assuming all OSDs are at the required level, its possible to add a new downlevel after this fact and cause corruption as the downlevel OSD won't be able to understand the new feature. The flag cannot be switched until all OSDs are uplevel, but once its switched it doesn't protect against new downlevel OSDs are added. This adds in the missing piece of protection. Signed-off-by: Jon Bailey <[email protected]>
…dd pre-X level OSDs after require_osd_release is set. Carried from ceph#68773; drop when this is rebased onto a main that has it. Signed-off-by: Jon Bailey <[email protected]>
…e_osd_release Carried from ceph#68773; drop when this is rebased onto a main that has it. The boot checks keyed on require_osd_release named squid, tentacle and umbrella, so after 'ceph osd require-osd-release vampire' an Umbrella OSD could still boot, and each later release would need another check that its kickoff could forget. The squid and tentacle ones are already covered by the N-2 lower bound. Refuse an OSD that lacks the SERVER_* feature of require_osd_release, looked up by a new ceph_release_server_feature(). unittest_features fails while the release being built has no feature there, which the release checklist now names instead of a per-release check. Fixes: https://tracker.ceph.com/issues/75563 Assisted-by: Claude Code Signed-off-by: Alex Ainscow <[email protected]>
|
(claude response) Pushed on behalf of Alex Ainscow: one more commit, "qa/suites/rados/upgrade: test the boot of an OSD older than require_osd_release" (643fb67). It adds It passes with this PR: https://pulpito.ceph.com/aainscow-2026-11-10_10:37:12-rados:upgrade-wip-aainscow-osd-boot-require-release-261110-distro-default-trial/ On main without the fix, it fails at the "osd.3 stays down" check because osd.3 boots on umbrella: https://pulpito.ceph.com/aainscow-2026-11-10_08:53:03-rados:upgrade-main-distro-default-trial/ |
643fb67 to
5de14e3
Compare
|
LGTM but probably good to squash commits, keep the QA commit separate? Also Anthony mentioned adding a health warn but I can't see that in this PR |
There was a problem hiding this comment.
Should this line be updated to use same style as everything else, i.e to X?
The checklist step for the require-osd-release calls in the qa upgrade suites still named tentacle, the release it was written for. Use X like the other steps. Answers Callum James' review comment on ceph#68773 (ceph#68773 (comment)). Assisted-by: Claude Code
bill-scales
left a comment
There was a problem hiding this comment.
LGTM - Although last couple of commits need squashing or signing off.
My opinion is that a health check is overkill. With a cephadm managed cluster this condition should never happen - it manages the upgrade and updates require_osd_release at the end of the upgrade. Cephadm is responsible for making sure all the OSDs get upgraded.
If you are managing a cluster yourself you need to upgrade the OSDs and then set require_osd_release at the end. You only get into difficulties if an OSD is down during the upgrade and you set require_osd_release while the OSD is missing and hasn't been upgraded and then later it returns and tries to rejoin the cluster. We hope this is a very unlikely scenario because at the moment without this PR that OSD is liable to crash and/or crash other OSDs because it will liable to send/receive messages that can't be decoded. Having an OSD that doesn't boot is better than having an OSD that crashes/crashes other OSDs.
The checklist step for the require-osd-release calls in the qa upgrade suites still named tentacle, the release it was written for. Use X like the other steps. Answers Callum James' review comment on ceph#68773 (ceph#68773 (comment)). Assisted-by: Claude Code
143c4ed to
8f538ac
Compare
|
(claude response) The require_osd_release upgrade test ("qa/suites/rados/upgrade: test the boot of an OSD older than require_osd_release") has moved to #72644, together with its release-checklist line. That PR holds the QA for both this PR and #72643. With 72643, raising require_osd_release also commits the upgrade to pools over zones, and the test needed a change for that. This PR now has the fix and the checklist wording only (head 8f538ac); the other commits are unchanged. The earlier runs of the test against this PR are linked in #68773 (comment). |
Currently it is still possible for a downlevel OSD to join the cluster, as explained in https://tracker.ceph.com/issues/75563. This commit adds protections to prevent this being possible. by making it so that downlevel OSDs get rejected from the cluster after you raise the require-osd-release flag. This is necissairy as some features use this flag as a gate to decide on whether to enable new features of not. If a feature changes metadata assuming all OSDs are at the required level, its possible to add a new downlevel after this fact and cause corruption as the downlevel OSD won't be able to understand the new feature. The flag cannot be switched until all OSDs are uplevel, but once its switched it doesn't protect against new downlevel OSDs are added. This adds in the missing piece of protection. Signed-off-by: Jon Bailey <[email protected]> Signed-off-by: Alex Ainscow <[email protected]>
… level OSDs after require_osd_release is set. Signed-off-by: Jon Bailey <[email protected]> Signed-off-by: Alex Ainscow <[email protected]>
…lease The boot checks keyed on require_osd_release named squid, tentacle and umbrella, so after 'ceph osd require-osd-release vampire' an Umbrella OSD could still boot, and each later release would need another check that its kickoff could forget. The squid and tentacle ones are already covered by the N-2 lower bound. Refuse an OSD that lacks the SERVER_* feature of require_osd_release, looked up by a new ceph_release_server_feature(). unittest_features fails while the release being built has no feature there, which the release checklist now names instead of a per-release check. Fixes: https://tracker.ceph.com/issues/75563 Assisted-by: Claude Code Signed-off-by: Alex Ainscow <[email protected]>
The checklist step for the require-osd-release calls in the qa upgrade suites still named tentacle, the release it was written for. Use X like the other steps. Answers Callum James' review comment on ceph#68773 (ceph#68773 (comment)). Assisted-by: Claude Code Signed-off-by: Alex Ainscow <[email protected]>
8f538ac to
841baf6
Compare
|
This is an automated message by src/script/redmine-upkeep.py. I have resolved the following tracker ticket due to the merge of this PR: No backports are pending for the ticket. If this is incorrect, please update the tracker |
Currently it is still possible for a downlevel OSD to join the cluster, as explained in https://tracker.ceph.com/issues/75563. This commit adds protections to prevent this being possible. by making it so that downlevel OSDs get rejected from the cluster after you raise the require-osd-release flag.
This is necissairy as some features use this flag as a gate to decide on whether to enable new features of not. If a feature changes metadata assuming all OSDs are at the required level, its possible to add a new downlevel after this fact and cause corruption as the downlevel OSD won't be able to understand the new feature.
The flag cannot be switched until all OSDs are uplevel, but once its switched it doesn't protect against new downlevel OSDs are added. This adds in the missing piece of protection.
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.