Repository navigation
mon: carry the stretch fixes proposed for main into stretchy-C - #44
Merged
Merged
Conversation
…aying half size Carried from ceph/ceph PR 72381 (branch wip-stretch-degraded-pool-create); drop when stretchy-C is rebased onto a main that has it. A replicated pool created while the cluster is in degraded stretch mode is given half the stretch pool size and a peering_crush_bucket_target of 1. The return to healthy stretch mode restores only the bucket count and min_size, so once the lost site is back the pool has size 2 and min_size 2: the stretch rule puts both replicas in one zone, a bucket count of 2 cannot be met, and every PG stays clean+peered. Create a pool in degraded stretch mode, write to it, bring the site back and expect the pool to match the other stretch pool and go clean. This fails on the size check. Fixes: https://tracker.ceph.com/issues/81390 Assisted-by: Claude Code Signed-off-by: Alex Ainscow <[email protected]>
…raded stretch mode Carried from ceph/ceph PR 72381 (branch wip-stretch-degraded-pool-create); drop when stretchy-C is rebased onto a main that has it. Entering degraded stretch mode lowers each stretch pool's bucket count to the surviving bucket count, sets the mandatory member and halves min_size. Size and peering_crush_bucket_target are left alone, and trigger_healthy_stretch_mode() undoes exactly those changes. A pool created during degraded mode also had its size and bucket target halved, which nothing restores. Apply only the changes the existing pools get, so the healthy transition brings the new pool back to the full stretch size with the others. Fixes: https://tracker.ceph.com/issues/81390 Assisted-by: Claude Code Signed-off-by: Alex Ainscow <[email protected]>
Carried from branch wip-mon-failed-pool-create, together with Jamie Pryde's "mon: Roll back pending_inc on prepare_new_pool failure" from ceph/ceph PR 71130, which follows unchanged; drop both when stretchy-C is rebased onto a main that has them. prepare_new_pool() adds the new pool to pending_inc before it has finished checking the request. If a later check fails, for example a crimson erasure pool whose profile does not support EC optimizations, the pool stays in pending_inc without a name. The next proposal then asserts in OSDMap::get_pool_name() from OSDMap::check_health(): osd/OSDMap.h: 1437: FAILED ceph_assert(i != pool_name.end()) Assisted-by: Claude Code Signed-off-by: Alex Ainscow <[email protected]>
Any error return in prepare_new_pool() after the new pool has been inserted into pending_inc.new_pools and pending_inc.new_pool_max has been incremented, but before pending_inc.new_pool_names is set, leaves pending_inc in an inconsistent state: the pool ID is present in new_pools but absent from new_pool_names. On the next encode_pending() call, apply_incremental() adds the unnamed pool to tmp.pools but not to tmp.pool_name. check_health() then iterates pools and calls get_pool_name() on the unnamed ID, hitting ceph_assert(i != pool_name.end()) and crashing the monitor. Fix with a make_scope_guard() that erases the pool from pending_inc.new_pools and decrements pending_inc.new_pool_max on scope exit. The guard is dismissed once new_pool_names is set, so any error return between pool allocation and name assignment automatically triggers rollback without requiring explicit cleanup at each site. Fixes: https://tracker.ceph.com/issues/79574 Signed-off-by: Jamie Pryde <[email protected]> Assisted-by: IBM Bob 2.0.2 Signed-off-by: Alex Ainscow <[email protected]>
Carried from ceph/ceph PR 72378 (branch wip-monc-ping-uaf); drop when stretchy-C is rebased onto a main that has it. ping_monitor() deletes its temporary messenger while its ConnectionRef is still in scope, so the last reference goes when the function returns and ~AsyncConnection then reads async_msgr->cct from the freed messenger. With cephx, "ceph ping mon.X" segfaulted in 164 of 180 attempts on a vstart cluster: SubsystemMap::should_gather AsyncConnection::~AsyncConnection MonClient::ping_monitor librados::RadosClient::ping_monitor Release the connection before shutting the messenger down. After this, 180 pings had no crashes. Fixes: https://tracker.ceph.com/issues/81400 Assisted-by: Claude Code Signed-off-by: Alex Ainscow <[email protected]>
Carried from branch wip-mon-stretch-command-fixes for ceph/ceph main; drop when stretchy-C is rebased onto a main that has it. run_mon always runs ceph-mon --mkfs before it starts the daemon, so a test that kills a monitor and starts it again on its existing data has to repeat the arguments run_mon gives ceph-mon. Move the command that starts the daemon into activate_mon, as activate_osd does for OSDs, and call it from run_mon after --mkfs. test_activate_mon restarts a monitor with an extra option. Assisted-by: Claude Code Signed-off-by: Alex Ainscow <[email protected]>
Carried from branch wip-mon-stretch-command-fixes for ceph/ceph main; drop when stretchy-C is rebased onto a main that has it. Stretch mode on main supports replicated pools only: enable_stretch_mode refuses a cluster with erasure coded pools, and pool creation refuses them once stretch mode is on. 'ceph osd pool stretch set' does not check the pool type, so it turns an erasure coded pool into a stretch pool, and 'ceph osd pool stretch unset' then applies whatever size it is given, for example size 6 to a k=2 m=1 pool. Add mon-stretch-commands.sh for the stretch pool and stretch mode commands, with a test on 3 mons and no OSDs that expects stretch set on an EC pool to fail and the pool's size and min_size to stay as created, and a replicated pool as the control. Only stretch set is checked: with a fixed monitor no EC pool can be made a stretch pool, so the size check of stretch unset cannot be set up, and the test only expects unset to find no stretch pool. TEST_stretch_set_ec_pool fails on the current code. Fixes: https://tracker.ceph.com/issues/81427 Assisted-by: Claude Code Signed-off-by: Alex Ainscow <[email protected]>
Carried from branch wip-mon-stretch-command-fixes for ceph/ceph main; drop when stretchy-C is rebased onto a main that has it. Stretch mode on main supports replicated pools only, but 'ceph osd pool stretch set' accepted an erasure coded pool, and 'ceph osd pool stretch unset' then applied any size to it (a k=2 m=1 pool became size 6). stretch set now refuses an erasure coded pool with -EINVAL, worded as enable_stretch_mode words the same refusal. stretch unset can then only meet an erasure coded pool that an older mon stretched. Refusing it outright would leave no way to clear the stretch values, so it accepts such a pool only with size k+m and min_size between k and k+m, which also repairs a size the old stretch set changed, and refuses anything else with -EINVAL. Fixes: https://tracker.ceph.com/issues/81427 Assisted-by: Claude Code Signed-off-by: Alex Ainscow <[email protected]>
Carried from branch wip-mon-stretch-command-fixes for ceph/ceph main; drop when stretchy-C is rebased onto a main that has it. Say in doc/rados that 'ceph osd pool stretch set' refuses erasure-coded pools, and what 'ceph osd pool stretch unset' needs to clear an erasure-coded pool that an older release made a stretch pool. The EC stretch cluster design said that stretch set works for any pool type and that stretch unset needs no EC-specific changes. Say that stretch set refuses EC pools and which EC pools stretch unset accepts, and that allowing EC pools with zones > 1 must relax that refusal and let the unset size check allow zones x (K+M). Fixes: https://tracker.ceph.com/issues/81427 Assisted-by: Claude Code Signed-off-by: Alex Ainscow <[email protected]>
…ch mode Carried from branch wip-mon-stretch-command-fixes for ceph/ceph main; drop when stretchy-C is rebased onto a main that has it. 'ceph osd pool stretch set' and 'ceph osd pool stretch unset' configure an individual stretch pool, which doc/rados/operations/stretch-mode.rst offers as the alternative to stretch mode. Stretch mode manages the pools' stretch values itself: enable_stretch_mode sets them, and the degraded and healthy transitions change them. The monitor nevertheless accepts both commands while stretch mode is enabled. For example, stretch set run in degraded stretch mode gives the pool the healthy bucket count, so its PGs stay peered until the lost zone returns. Add a test to mon-stretch-commands.sh that enables stretch mode with 3 mons and 4 OSDs in two zones and expects stretch set and stretch unset to fail and to leave the pool's bucket count, crush rule and size alone. Stretch set succeeds on the current code. Fixes: https://tracker.ceph.com/issues/81428 Assisted-by: Claude Code Signed-off-by: Alex Ainscow <[email protected]>
…abled Carried from branch wip-mon-stretch-command-fixes for ceph/ceph main; drop when stretchy-C is rebased onto a main that has it. 'ceph osd pool stretch set' and 'ceph osd pool stretch unset' configure an individual stretch pool, the alternative to stretch mode, but the monitor accepted both while stretch mode was enabled. Stretch mode sets the pools' stretch values itself and changes them in its degraded and healthy transitions, and a pool changed by hand does not follow them: stretch set in degraded stretch mode gave the pool the healthy bucket count, so its PGs stayed peered until the lost zone returned. Refuse both commands with -EINVAL while stretch mode is enabled. Fixes: https://tracker.ceph.com/issues/81428 Assisted-by: Claude Code Signed-off-by: Alex Ainscow <[email protected]>
Carried from branch wip-mon-stretch-command-fixes for ceph/ceph main; drop when stretchy-C is rebased onto a main that has it. Say in doc/rados that 'ceph osd pool stretch set' and 'ceph osd pool stretch unset', which configure individual stretch pools, fail while stretch mode is enabled. Say the same in the EC stretch cluster design, and that allowing EC pools with zones > 1 must relax this refusal as well. Fixes: https://tracker.ceph.com/issues/81428 Assisted-by: Claude Code Signed-off-by: Alex Ainscow <[email protected]>
…iming to act when it cannot Carried from branch wip-mon-stretch-command-fixes for ceph/ceph main; drop when stretchy-C is rebased onto a main that has it. 'ceph osd force_healthy_stretch_mode' only ends recovery stretch mode, but in healthy or degraded stretch mode it does nothing and still replies "Triggering healthy stretch mode" with success, so an operator who runs it before the cluster is recovering believes it took effect. Add a test to mon-stretch-commands.sh that expects the command to fail in healthy and in degraded stretch mode, and to return the cluster to healthy stretch mode once it is recovering. Zone pze is lost by killing its mon and OSDs and restored by starting them again with activate_mon and activate_osd. The command succeeds in healthy stretch mode on the current code. Fixes: https://tracker.ceph.com/issues/81429 Assisted-by: Claude Code Signed-off-by: Alex Ainscow <[email protected]>
…tch mode Carried from branch wip-mon-stretch-command-fixes for ceph/ceph main; drop when stretchy-C is rebased onto a main that has it. 'ceph osd force_healthy_stretch_mode' only ends recovery stretch mode. In healthy or degraded stretch mode, or without stretch mode, it did nothing and still replied "Triggering healthy stretch mode" with success. Refuse it with -EINVAL and say that the cluster is not in recovery stretch mode, before asking for --yes-i-really-mean-it. force_recovery_stretch_mode has no such check to follow. Fixes: https://tracker.ceph.com/issues/81429 Assisted-by: Claude Code Signed-off-by: Alex Ainscow <[email protected]>
Carried from branch wip-mon-stretch-command-fixes for ceph/ceph main; drop when stretchy-C is rebased onto a main that has it. Say that 'ceph osd force_healthy_stretch_mode' fails unless the cluster is in recovery mode. Fixes: https://tracker.ceph.com/issues/81429 Assisted-by: Claude Code Signed-off-by: Alex Ainscow <[email protected]>
aainscow
force-pushed
the
wip-stretchy-C-pr43-01-carry-main
branch
from
October 7, 2026 11:02
1c78333 to
2d58245
Compare
aainscow
marked this pull request as ready for review
October 7, 2026 11:05
This was referenced Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Carries four fix series that are proposed for main into stretchy-C. The stretchy-C monitor fixes split out of #43 build on them, and follow in separate PRs.
The commits are the ones proposed for main. Each of Alex's commits gains a first paragraph saying where it is carried from, and that it drops when stretchy-C is rebased onto a main that has it. Jamie Pryde's fix is byte-identical; the test before it carries the note for both.
pending_incwhenprepare_new_pool()fails (2 commits): Jamie Pryde's fix from mon: Roll back pending_inc on prepare_new_pool failure ceph/ceph#71130, for https://tracker.ceph.com/issues/79574, after a test that is not yet proposed for main.stretch setrefuses erasure coded pools), https://tracker.ceph.com/issues/81428 (stretch setandunsetare refused while stretch mode is enabled) and https://tracker.ceph.com/issues/81429 (force_healthy_stretch_modefails outside recovery stretch mode).The later PRs need:
When stretchy-C is next rebased onto a main that has these, twelve drop by patch-id. Three must be dropped by hand:
Testing
git range-diffshows every commit identical); abaef77 adds Callum James's six commits.ninja -k 0 -j20built with no errors or warnings.unittest_mon_monmappassed 2/2 andunittest_osd_monitorpassed 17/17.qa/standalone/mon-stretchscripts passed, among themmon-stretch-commands.sh(4 tests) andmon-stretch-pool-create-degraded.shfrom this PR.mon/osd-pool-create.shpassed 19/19, including this PR'sTEST_failed_pool_create_leaves_no_pool.crush/crush-stretch.sh(9 tests),mon/osd-crush.sh(9 tests) andceph-helpers.sh'stest_run_monandtest_activate_monpassed. There were no cores.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.
🤖 Generated with Claude Code