Skip to content

doc,qa: describe the erasure code profile lifecycle - #50

Merged
aainscow merged 1 commit into
stretchy-Cfrom
wip-stretchy-C-pr43-06-profile-lifecycle
Oct 7, 2026
Merged

aainscow merged 1 commit into
stretchy-Cfrom
wip-stretchy-C-pr43-06-profile-lifecycle

Conversation

@aainscow

@aainscow aainscow commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Sixth PR split out of #43. Docs and QA only, with no functional change to Ceph. It does three things:

  1. Documents that an erasure code profile is now deleted with its last pool. Callum James's 8efd3a0 ("mon: add EC pool creation parameters for automatic profile generation") made the monitor delete a profile when the last pool that uses it is deleted, unless it is the default profile. On main a profile stays until ceph osd erasure-code-profile rm. Nothing documented this. The profile user doc gets a lifecycle section: how a profile is created (osd erasure-code-profile set, or osd pool create with --k and --m), when it is deleted, and a note for scripts that reuse a profile after deleting its pools. The pool doc points at it.

  2. Fixes two qa users broken by that change. Both reused a profile after deleting its last pool.

    • TEST_erasure_pool_crush_rule_rm in mon/osd-crush.sh fails on stretchy-C today. It now checks that the profile went with the pool and sets it again.
    • The rados teuthology task set up its profile and CRUSH rule once, then created and deleted pools in every run, so a second run used a profile that no longer existed. It now sets them up at the start of every run.
  3. Brings the stretch EC design doc in line with the code. A new section 2.1.5 describes how a stretch EC pool gets its profile (generated from --k/--m, named, or default), the generated profile's name and contents, the parameter combinations the monitor refuses, how the profile sets the pool's size, shard counts and CRUSH rule, and when the profile is deleted. Passages that contradicted the code are corrected:

    • Stretch EC pools do use profiles, and a profile, named or default, can be used with num_zones greater than 1. Sections 1, 2.1.4 and 2.1.5 say this is permanent, not transitional, as Eric asked (1, 2, 3).
    • num_zones is set per pool and is never part of a profile. A num_zones key set in a profile is ignored.
    • num_zones can be changed with ceph osd pool set <pool> num_zones <n>, which osd, mon: support per-zone replica min_size for stretch pools #35 implemented (1 or 2 zones, outside global stretch mode). It is no longer described as impossible (Eric's comment) or as a later-release item done by swapping profiles (sections 2.1.5, 13.2 and 14.4).
    • osd pool stretch set does not refuse EC pools.
    • The planned OSD feature bit (section 15) gates num_zones > 1 pools, not profiles, and is not implemented yet.

Not changed here: a pool created from the default profile shares the erasure-code CRUSH rule, so with num_zones greater than 1 it changes or reuses that shared rule. Section 2.1.5 describes that as the code does it today. A later PR of this series gives a multi-zone pool its own rule instead, so that osd pool create foo erasure --num-zones 2 works, as Eric asked (comment).

Testing

  • This branch is stretchy-C e813071 with this commit. It changes only docs, a standalone test and a teuthology task.
  • mon/osd-crush.sh passed 9/9, including TEST_erasure_pool_crush_rule_rm. On stretchy-C without this commit, TEST_erasure_pool_crush_rule_rm fails, because the profile is now deleted with its last pool.
  • The rados task change was not run in teuthology. The docs were not built with Sphinx; docutils reports no warnings in the design doc apart from Sphinx-only directives.

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

@github-actions github-actions Bot added core documentation Improvements or additions to documentation tests labels Oct 7, 2026
No monitor or OSD code changes.

Since "mon: add EC pool creation parameters for automatic profile
generation", the monitor deletes an erasure code profile with the last
pool that uses it, unless it is the default profile. On main a profile
stays until 'osd erasure-code-profile rm'. Document this in the profile
and pool user docs: how a profile is created ('osd erasure-code-profile
set', or 'osd pool create' with k and m), when it is deleted, and a note
for scripts that reuse a profile after deleting its pools.

Fix two qa users that reused a profile after deleting its last pool.
TEST_erasure_pool_crush_rule_rm in osd-crush.sh now checks that the
profile went with the pool and sets it again. The rados task set up its
profile and CRUSH rule once and then created and deleted pools in every
run, so a second run created its pools with a profile that no longer
existed; it now sets them up at the start of every run.

Bring the stretch EC design doc in line with the code. Add section
2.1.5: how a pool gets its profile (generated from k and m, named, or
default), the generated profile's name and contents, the parameter
combinations the monitor refuses, how the profile sets the pool's size,
shard counts and CRUSH rule, what multi-zone pools need, and when a
profile is deleted. Correct the passages that said stretch EC pools do
not use profiles, that num_zones is a profile key or would be changed by
swapping profiles, that changing num_zones is a later-release feature,
and that 'osd pool stretch set' refuses EC pools. A profile, named or
default, can be used with num_zones greater than 1; sections 1, 2.1.4
and 2.1.5 say that this stays supported. num_zones is set per pool and
is never part of a profile.

Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
@aainscow
aainscow marked this pull request as ready for review October 7, 2026 20:22
@aainscow
aainscow force-pushed the wip-stretchy-C-pr43-06-profile-lifecycle branch from 51d8b3b to f1502cb Compare October 7, 2026 20:23
@aainscow
aainscow merged commit f4b9542 into stretchy-C Oct 7, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core documentation Improvements or additions to documentation tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant