Skip to content

mon/OSDMonitor: add missing checks to the stretch pool and stretch mode commands - #72416

Merged
ljflores merged 4 commits into
ceph:mainfrom
aainscow:wip-mon-stretch-command-fixes
Oct 21, 2026
Merged

ljflores merged 4 commits into
ceph:mainfrom
aainscow:wip-mon-stretch-command-fixes

Conversation

@aainscow

@aainscow aainscow commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Three defects in the stretch pool and stretch mode monitor commands, found while testing stretch erasure coded pools on a development branch and shown on a main build:

  1. ceph osd pool stretch set accepted an erasure-coded pool, although stretch pools must be replicated (ceph mon enable_stretch_mode refuses EC pools). stretch set and ceph osd pool stretch unset then applied whatever size they were given: a k=2 m=1 pool became size 6, which ceph osd pool set size refuses for an EC pool. stretch set now refuses an EC pool, with the message enable_stretch_mode uses. stretch unset can then only meet an EC pool that an older release stretched. Refusing it would leave no way to clear its 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.
  2. ceph osd pool stretch set and ceph osd pool stretch unset configure an individual stretch pool, which doc/rados/operations/stretch-mode.rst ("Individual Stretch Pools") offers as the alternative to stretch mode: stretch mode for exactly two data centers, a stretch pool for a pool spread over more than two. The monitor nevertheless accepted both while stretch mode was enabled. Stretch mode sets every pool's stretch values itself and changes them in its degraded and healthy transitions, and a pool changed by hand does not follow them. For example, stretch set in degraded stretch mode gave the pool the healthy peering_crush_bucket_count of 2 while only one zone was up, so its PGs stayed undersized+peered and its I/O blocked until the lost zone returned. Both commands now fail with -EINVAL while stretch mode is enabled.
  3. ceph osd force_healthy_stretch_mode only ends recovery stretch mode, but in any other state it did nothing and still replied "Triggering healthy stretch mode" with success. It now fails with -EINVAL outside recovery stretch mode.

Each fix is one commit together with the standalone test that shows the defect and its documentation (doc/rados/operations/pools.rst and stretch-mode.rst). The EC stretch cluster design (doc/dev/osd_internals/erasure_coding/ec_stretch_cluster.rst) is not changed here: its updates for these refusals are part of the stretch cluster work in #72643.

All the tests are in qa/standalone/mon-stretch/mon-stretch-commands.sh. The EC tests run 3 mons without OSDs; the others run 3 mons and 4 OSDs in two zones plus a tiebreaker, in stretch mode. To restart a monitor on its existing data without copying run_mon's ceph-mon arguments, qa/standalone: split activate_mon out of run_mon moves the command that starts the daemon into a new activate_mon in ceph-helpers.sh, as activate_osd does for OSDs; run_mon calls it after --mkfs.

Testing, on a main build, with ceph-mon rebuilt at each step:

  • Each new test failed without its fix and passed with it (checked before the test, fix and doc commits were squashed into one commit per defect).
    • TEST_stretch_set_ec_pool fails because the monitor answers "pool ec stretch values are set successfully" for a k=2 m=1 pool (TEST_stretch_set_replicated_pool passes). With the fix, stretch set on the EC pool is refused, stretch unset fails with "pool ec is not a stretch pool", and the pool's size, min_size and bucket count are unchanged. The test checks only stretch set: with the fix no EC pool can be made a stretch pool, so the EC size check of stretch unset cannot be set up (next bullet).
    • TEST_stretch_pool_commands_in_stretch_mode fails because, in healthy stretch mode, ceph osd pool stretch set stretched 2 2 zone replicated_rule 6 3 returns 0 ("pool stretched stretch values are set successfully"). A copy of the test without that step showed ceph osd pool stretch unset stretched replicated_rule 3 2 accepted as well ("pool stretched is no longer a stretch pool, all stretch values are unset successfully"). With the fix both are refused ("... is for individual stretch pools and cannot be used while stretch mode is enabled"), and the pool keeps bucket count 2, its stretch rule and size 4.
    • TEST_force_healthy_stretch_mode_requires_recovery (run with the other two fixes in place) fails because the command returns 0 with "Triggering healthy stretch mode" in healthy stretch mode. With the fix it is refused in healthy and in degraded stretch mode, and in recovery stretch mode it returns the cluster to healthy stretch mode.
  • stretch unset on an EC pool that an older monitor stretched, which the tests cannot set up now that stretch set refuses EC pools: the unfixed monitor stretched a k=2 m=1 pool (size 4, bucket count 2), then the fixed monitor was started on the same store. Unset with size 6, and with min_size 1, was refused; unset with size 3 and min_size 2 succeeded (size 3, min_size 2, bucket count 0); stretch set again was refused.
  • At the head of the branch, after ninja vstart-base cython_cephfs cython_rbd, one at a time: qa/standalone/mon-stretch/mon-stretch-commands.sh (all four tests), mon-stretch/mon-stretch-fail-recovery.sh, mon-stretch/mon-stretch-uneven-crush-weights.sh and mon/osd-pool-create.sh pass, and so do the helper self-tests qa/standalone/ceph-helpers.sh TESTS test_run_mon test_activate_mon.
  • qa/workunits/mon/mon-stretch-pool.sh passes at the head of the branch against a standalone cluster shaped like rados/singleton/all/mon-stretch-pool.yaml (9 mons, 9 OSDs, connectivity election, default pool size 6). Nothing in qa/ or src/ uses stretch set or stretch unset with stretch mode enabled; the teuthology tasks stretch_cluster.py and test_netsplit_3az_stretch_pool.py use them without stretch mode and were not run.
  • The docs were not built. pools.rst and stretch-mode.rst were checked with docutils (no messages beyond the unknown Sphinx directives and roles that main also gives), and git diff --check is clean.

Backport: umbrella and tentacle. The command handlers are the same as main on both, and the commits cherry-pick cleanly apart from small doc conflicts. squid is not proposed: it reaches end of life on 2026-10-31, and the first fix would need a squid-only patch. The defects came in with #56233 (1 and 2; in squid from v19.2.1 through #59084), #60631 (the size arguments of stretch unset, v20.1.0 on) and #35906 (3, from Pacific on).

Fixes: https://tracker.ceph.com/issues/81427
Fixes: https://tracker.ceph.com/issues/81428
Fixes: https://tracker.ceph.com/issues/81429

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 x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

🤖 Generated with Claude Code

https://claude.ai/code/session_012ETDivFUQubLqznTDowHRu

@Ericmzhang Ericmzhang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with the changes. Need to squash commits and add signed-off-by.

@aainscow
aainscow force-pushed the wip-mon-stretch-command-fixes branch from 4066bb2 to 5fae34f Compare October 8, 2026 15:39
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 9, 2026
6583a08 ("mon: Prevent osd pool stretch set for EC",
#41) made ceph osd pool stretch set
refuse EC pools: an EC pool is stretched and unstretched with ceph osd
pool set <pool> num_zones <n>, which works out the rule, size, min_size,
peering values and nonprimary_shards from the zone count. 8b30768
("mon: add per-zone replica configuration for stretch pools",
#35), written before that change
and merged after it, brought back the older EC branch. stretch set has
accepted a FastEC pool again since, while doc/rados/operations/pools.rst
still says it is for replicated pools only.

stretch set now refuses every EC pool again, with the message of
6583a08. stretch unset refuses an EC pool with num_zones > 1 and
points to num_zones 1. It accepts an EC pool with one zone only with
size k+m and min_size from k to k+m, as main does
(ceph#72416), because only an older
release's stretch set could have stretched such a pool. That check is
OSDMonitor::check_stretch_unset_ec(), which has unit tests.

The design (Sections 2.1.5 and 11.4.1) now states this and why, and
pools.rst says what stretch unset does with an EC pool. stretch set no
longer needs its own refusal of EC pools before the upgrade commit, and
the nonprimary_shards updates in stretch set and unset go, because no
multi-zone EC pool reaches them.

Tests: TEST_stretch_set_ec_pool in mon-stretch-commands.sh, and the
pre-commit stretch set check in mon-stretch-upgrade.sh expects the new
message.

Assisted-by: Claude Code
@aainscow
aainscow marked this pull request as ready for review October 12, 2026 14:41
@aainscow
aainscow requested review from a team as code owners October 12, 2026 14:41
@yuriw

yuriw commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to wip-yuri10-testing-20261012.162444-main.

``stretch_unset`` clears all ``peering_crush_*`` fields. No EC-specific
changes required.
``stretch_unset`` clears all ``peering_crush_*`` fields. It accepts an EC
pool only with ``size`` ``k+m`` and ``min_size`` between ``k`` and ``k+m``,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn’t size k+ m by definition? I may misunderstand the intent here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In stretch cluster size = num_zones * (k+m). This will make more sense in the wider context of this design. I am removing design changes from this PR and moving them to the main stretch cluster PR.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this end up with higher space amp than replication?

stretch set/unset`` on EC pools with ``zones > 1``. Add EC-specific
``min_size`` range validation (Section 11.4.1).
stretch set/unset`` on EC pools with ``zones > 1``. Both refusals in
Section 11.4.1, of EC pools and while stretch mode is enabled, must be

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are these section numbers?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am taking the design docs out of this PR, they belong in the main stretch cluster PR instead. The changes will not be lost, but need to be seen in the wider context.

I will also stop the document from referring to manually-constructed section numbers which will clearly get out of date.

aainscow added a commit to aainscow/ceph that referenced this pull request Oct 13, 2026
6583a08 ("mon: Prevent osd pool stretch set for EC",
#41) made ceph osd pool stretch set
refuse EC pools: an EC pool is stretched and unstretched with ceph osd
pool set <pool> num_zones <n>, which works out the rule, size, min_size,
peering values and nonprimary_shards from the zone count. 8b30768
("mon: add per-zone replica configuration for stretch pools",
#35), written before that change
and merged after it, brought back the older EC branch. stretch set has
accepted a FastEC pool again since, while doc/rados/operations/pools.rst
still says it is for replicated pools only.

stretch set now refuses every EC pool again, with the message of
6583a08. stretch unset refuses an EC pool with num_zones > 1 and
points to num_zones 1. It accepts an EC pool with one zone only with
size k+m and min_size from k to k+m, as main does
(ceph#72416), because only an older
release's stretch set could have stretched such a pool. That check is
OSDMonitor::check_stretch_unset_ec(), which has unit tests.

The design (Sections 2.1.5 and 11.4.1) now states this and why, and
pools.rst says what stretch unset does with an EC pool. stretch set no
longer needs its own refusal of EC pools before the upgrade commit, and
the nonprimary_shards updates in stretch set and unset go, because no
multi-zone EC pool reaches them.

Tests: TEST_stretch_set_ec_pool in mon-stretch-commands.sh, and the
pre-commit stretch set check in mon-stretch-upgrade.sh expects the new
message.

Assisted-by: Claude Code
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 13, 2026
6583a08 ("mon: Prevent osd pool stretch set for EC",
#41) made ceph osd pool stretch set
refuse EC pools: an EC pool is stretched and unstretched with ceph osd
pool set <pool> num_zones <n>, which works out the rule, size, min_size,
peering values and nonprimary_shards from the zone count. 8b30768
("mon: add per-zone replica configuration for stretch pools",
#35), written before that change
and merged after it, brought back the older EC branch. stretch set has
accepted a FastEC pool again since, while doc/rados/operations/pools.rst
still says it is for replicated pools only.

stretch set now refuses every EC pool again, with the message of
6583a08. stretch unset refuses an EC pool with num_zones > 1 and
points to num_zones 1. It accepts an EC pool with one zone only with
size k+m and min_size from k to k+m, as main does
(ceph#72416), because only an older
release's stretch set could have stretched such a pool. That check is
OSDMonitor::check_stretch_unset_ec(), which has unit tests.

The design (Sections 2.1.5 and 11.4.1) now states this and why, and
pools.rst says what stretch unset does with an EC pool. stretch set no
longer needs its own refusal of EC pools before the upgrade commit, and
the nonprimary_shards updates in stretch set and unset go, because no
multi-zone EC pool reaches them.

Tests: TEST_stretch_set_ec_pool in mon-stretch-commands.sh, and the
pre-commit stretch set check in mon-stretch-upgrade.sh expects the new
message.

Assisted-by: Claude Code
@aainscow

Copy link
Copy Markdown
Contributor Author

@ljflores

Copy link
Copy Markdown
Member

Approved, but @anthonyeleven 's comments were unaddressed.

cc @aainscow

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.

This also adds the qa/standalone test that shows the defect and updates the documentation.

Fixes: https://tracker.ceph.com/issues/81427
Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
…abled

'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.

This also adds the qa/standalone test that shows the defect and updates the documentation.

Fixes: https://tracker.ceph.com/issues/81428
Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
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]>
…tch mode

'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.

This also adds the qa/standalone test that shows the defect and updates the documentation.

Fixes: https://tracker.ceph.com/issues/81429
Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
@aainscow

Copy link
Copy Markdown
Contributor Author

Approved, but @anthonyeleven 's comments were unaddressed.

cc @aainscow

I am removing all design changes. They did not belong here.

@aainscow
aainscow force-pushed the wip-mon-stretch-command-fixes branch from 5fae34f to 3554f6a Compare October 16, 2026 10:10
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 16, 2026
Carried from ceph#72416; drop when this 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.

This also adds the qa/standalone test that shows the defect and updates the documentation.

Fixes: https://tracker.ceph.com/issues/81427
Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 16, 2026
…de is enabled

Carried from ceph#72416; drop when this 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.

This also adds the qa/standalone test that shows the defect and updates the documentation.

Fixes: https://tracker.ceph.com/issues/81428
Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 16, 2026
Carried from ceph#72416; drop when this 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]>
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 16, 2026
…ery stretch mode

Carried from ceph#72416; drop when this 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.

This also adds the qa/standalone test that shows the defect and updates the documentation.

Fixes: https://tracker.ceph.com/issues/81429
Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
@NitzanMordhai

Copy link
Copy Markdown
Contributor

@aainscow can you please check the output of the test in /a/yuriw-2026-10-12_20:51:29-rados-wip-yuri10-testing-20261012.162444-main-distro-default-trial/630129/teuthology.log

2026-10-13T01:10:56.884 INFO:tasks.workunit.client.0.trial079.stderr:device 'trial079' does not appear in the crush map 2026-10-13T01:10:56.893 INFO:tasks.workunit.client.0.trial079.stderr:+ ceph osd getcrushmap 2026-10-13T01:10:57.152 INFO:tasks.workunit.client.0.trial079.stderr:24 2026-10-13T01:10:57.160 INFO:tasks.workunit.client.0.trial079.stderr:+ crushtool --decompile crushmap 2026-10-13T01:10:57.168 INFO:tasks.workunit.client.0.trial079.stderr:+ sed 's/^# end crush map$//' crushmap.txt 2026-10-13T01:10:57.168 INFO:tasks.workunit.client.0.trial079.stderr:+ cat 2026-10-13T01:10:57.169 INFO:tasks.workunit.client.0.trial079.stderr:+ crushtool --compile crushmap_modified.txt -o crushmap.bin 2026-10-13T01:10:57.176 INFO:tasks.workunit.client.0.trial079.stderr:+ ceph osd setcrushmap -i crushmap.bin 2026-10-13T01:10:58.623 INFO:tasks.workunit.client.0.trial079.stderr:26 2026-10-13T01:10:58.634 INFO:tasks.workunit.client.0.trial079.stderr:+ ceph mon enable_stretch_mode e stretch_rule datacenter 2026-10-13T01:11:03.885 INFO:tasks.workunit.client.0.trial079.stderr:Error EINVAL: stretch mode is already engaged 2026-10-13T01:11:03.891 DEBUG:teuthology.orchestra.run:got remote process result: 22 2026-10-13T01:11:03.891 INFO:tasks.workunit:Stopping ['mon/mon-stretch-mode-5-mons-8-osds.sh'] on client.0... 2026-10-13T01:11:03.891 DEBUG:teuthology.orchestra.run.trial079:> sudo rm -rf -- /home/ubuntu/cephtest/workunits.list.client.0 /home/ubuntu/cephtest/clone.client.0 2026-10-13T01:11:04.230 ERROR:teuthology.run_tasks:Saw exception from tasks. Traceback (most recent call last): File "/home/teuthworker/src/git.ceph.com_teuthology_fe6031371eabe4a0f7c14f4bc08861392506c185/teuthology/run_tasks.py", line 105, in run_tasks manager = run_one_task(taskname, ctx=ctx, config=config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/teuthworker/src/git.ceph.com_teuthology_fe6031371eabe4a0f7c14f4bc08861392506c185/teuthology/run_tasks.py", line 83, in run_one_task return task(**kwargs) ^^^^^^^^^^^^^^ File "/home/teuthworker/src/github.com_ceph_ceph-ci_f8856b8b405fafdb7c3db9312cae2793292d11cd/qa/tasks/workunit.py", line 185, in task with parallel() as p: File "/home/teuthworker/src/git.ceph.com_teuthology_fe6031371eabe4a0f7c14f4bc08861392506c185/teuthology/parallel.py", line 84, in __exit__ for result in self: File "/home/teuthworker/src/git.ceph.com_teuthology_fe6031371eabe4a0f7c14f4bc08861392506c185/teuthology/parallel.py", line 98, in __next__ resurrect_traceback(result) File "/home/teuthworker/src/git.ceph.com_teuthology_fe6031371eabe4a0f7c14f4bc08861392506c185/teuthology/parallel.py", line 30, in resurrect_traceback raise exc.exc_info[1] File "/home/teuthworker/src/git.ceph.com_teuthology_fe6031371eabe4a0f7c14f4bc08861392506c185/teuthology/parallel.py", line 23, in capture_traceback return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/home/teuthworker/src/github.com_ceph_ceph-ci_f8856b8b405fafdb7c3db9312cae2793292d11cd/qa/tasks/workunit.py", line 570, in _run_tests remote.run( File "/home/teuthworker/src/git.ceph.com_teuthology_fe6031371eabe4a0f7c14f4bc08861392506c185/teuthology/orchestra/remote.py", line 599, in run r = self._runner(client=self.ssh, name=self.shortname, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/teuthworker/src/git.ceph.com_teuthology_fe6031371eabe4a0f7c14f4bc08861392506c185/teuthology/orchestra/run.py", line 461, in run r.wait() File "/home/teuthworker/src/git.ceph.com_teuthology_fe6031371eabe4a0f7c14f4bc08861392506c185/teuthology/orchestra/run.py", line 161, in wait self._raise_for_status() File "/home/teuthworker/src/git.ceph.com_teuthology_fe6031371eabe4a0f7c14f4bc08861392506c185/teuthology/orchestra/run.py", line 181, in _raise_for_status raise CommandFailedError( teuthology.exceptions.CommandFailedError: Command failed (workunit test mon/mon-stretch-mode-5-mons-8-osds.sh) on trial079 with status 22: 'cd -- /home/ubuntu/cephtest/mnt.0/client.0/tmp && CEPH_CLI_TEST_DUP_COMMAND=1 CEPH_REF=f8856b8b405fafdb7c3db9312cae2793292d11cd TESTDIR="/home/ubuntu/cephtest" CEPH_CLIENT_ID=0 CEPH_ARGS="--cluster=ceph" CEPH_ID="0" PATH=$PATH:/usr/sbin CE> 2026-10-13T01:11:04.683 ERROR:teuthology.util.sentry: Sentry event: https://sentry.ceph.com/organizations/ceph/?query=87e7283caddf4006b62caff6eb9be668
is that PR supposed to fix that issue as well?

@NitzanMordhai

Copy link
Copy Markdown
Contributor

@aainscow ignore that, this is issue with other pr that was already merged

@NitzanMordhai

Copy link
Copy Markdown
Contributor

@yuriw

yuriw commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

@aainscow this is ready for merge

aainscow added a commit to aainscow/ceph that referenced this pull request Oct 21, 2026
Carried from ceph#72416; drop when this 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.

This also adds the qa/standalone test that shows the defect and updates the documentation.

Fixes: https://tracker.ceph.com/issues/81427
Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 21, 2026
…de is enabled

Carried from ceph#72416; drop when this 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.

This also adds the qa/standalone test that shows the defect and updates the documentation.

Fixes: https://tracker.ceph.com/issues/81428
Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 21, 2026
Carried from ceph#72416; drop when this 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]>
aainscow added a commit to aainscow/ceph that referenced this pull request Oct 21, 2026
…ery stretch mode

Carried from ceph#72416; drop when this 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.

This also adds the qa/standalone test that shows the defect and updates the documentation.

Fixes: https://tracker.ceph.com/issues/81429
Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
@ljflores
ljflores merged commit 45ecadb into ceph:main Oct 21, 2026
18 checks passed
@aainscow aainscow mentioned this pull request Oct 23, 2026
4 of 14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants