Skip to content

mon: Prevent osd pool stretch set for EC - #41

Merged
Ericmzhang merged 1 commit into
aainscow:stretchy-Cfrom
Ericmzhang:wip-stretch-ec-prevent-stretch-set
Oct 5, 2026
Merged

Ericmzhang merged 1 commit into
aainscow:stretchy-Cfrom
Ericmzhang:wip-stretch-ec-prevent-stretch-set

Conversation

@Ericmzhang

Copy link
Copy Markdown
Collaborator

Osd pool stretch set is a legacy command so it will not be supported for stretch EC. Instead, use osd pool set 'pool_name' num_zones to set a non-stretch pool to stretched.

Signed-off-by: Eric Zhang [email protected]

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.

@github-actions github-actions Bot added build/ops common core documentation Improvements or additions to documentation mgr mon tests labels Oct 5, 2026
Osd pool stretch set is a legacy command so it will not be supported for stretch EC.
Instead, use osd pool set 'pool_name' num_zones <N> to set a non-stretch pool
to stretched

Signed-off-by: Eric Zhang <[email protected]>
@Ericmzhang
Ericmzhang force-pushed the wip-stretch-ec-prevent-stretch-set branch from 69646fa to 0b77270 Compare October 5, 2026 22:08
@Ericmzhang
Ericmzhang merged commit 6583a08 into aainscow:stretchy-C Oct 5, 2026
4 of 5 checks passed
aainscow added a commit 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 added a commit 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 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants