doc/dev: ec_stretch_cluster: refactor global stretch mode #54
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #54"
general
weight: 0.35
kamoltat
<!--
- Please give your pull request a title like
[component]: [short description]
- Please use this format for each git commit message:
[component]: [short description]
[A longer multiline description]
Fixes: [ticket URL on tracker.ceph.com, create one if necessary]
Signed-off-by: [Your Name] <[your email]>
For examples, use "git log".
-->
Refactors global stretch mode, as agreed: whether a pool is stretched depends only on its own
num_zones, everyceph osd pool createparameter takes its default from anosd_pool_default_option, andceph mon enable_stretch_mode/disable_stretch_modebecome commands that set those defaults and change every pool.The first commit is the design (
doc/dev/osd_internals/erasure_coding/ec_stretch_cluster.rst, Sections 2.3, 11.3, 13.2 and 15). Commits 2–12 implement it. The commits after them answer reviews; each says which commit it will be squashed into before merge, or that it stays on its own.Commits
1.
doc/dev: ec_stretch_cluster: refactor global stretch mode: the design.2.
osd: pg_pool_t num_zones and replica in v34, total min_size before.3.
mon: pool create takes its defaults from osd_pool_default_ options: newosd_pool_default_replica,_num_zones,_zone_failure_domain,_osd_failure_domain,_root,_class.4.
mon: build and check pool create parameters in four steps: load the defaults, use the erasure code profile, apply the command line, check the result (src/mon/PoolCreateParams.{h,cc}), shared by pool create (command and librados),ceph osd pool default setand the stretch mode commands.5.
mon: add ceph osd pool default set and get: plus thePOOL_DEFAULT_OVERRIDDENhealth warning.6.
mon: replace global stretch mode with per-pool num_zones commands.7.
mon: wait for the upgrade commit before num_zones can change.8.
mon,mgr: size new pools as num_zones times the replicas per zone.9.
doc: stretch mode commands and pool creation defaults.10.
mon: recompute nonprimary_shards when a pool's num_zones changes.11.
qa/standalone: test pool creation defaults and stretch mode commands.12.
mon: use osd_pool_default_crush_rule for every pool it suits.Review responses (owner review, and an independent review of the PR):
mon/OSDMonitor: refuse osd pool stretch set for EC pools again(#41's refusal, undone by #35's merge) andmon/OSDMonitor: keep stretch set's min_size as a total over all zones.mon/ConfigMap: report the section that gives an entity's value(ceph config get <who>named the least specific section that sets an option, not the one whose value is used;POOL_DEFAULT_OVERRIDDENasks the same question).num_zones 2checked against stretch mode; duplicate helpers removed or shared; at most two zones and 128 OSDs per pool, and LRC profiles left to their plugin; crimson config getters;default setchecks amin_sizedefault only against the replicas per zone, not as an EC pool;disable_stretch_moderesets defaults left without stretch mode; the teuthology task's pool; per-monitor mask checks inPOOL_DEFAULT_OVERRIDDEN; design text fixes; standalone test expectations for the four-step order of checks.Points for reviewers
1. Release. No Vampire release or feature bit exists yet, so struct version 34 and the upgrade gate (
OSDMonitor::NUM_ZONES_RELEASE) use Umbrella. Both move to Vampire together once it is defined.2. Open design questions for the design call:
min_sizeacross the upgrade; librados (RGW) pool creation in a stretched cluster; EC profiles versus the default CRUSH rule; a repeatedenable_stretch_mode; whatdefault setpromises; named profiles and the zone type; deleting the user's stretch rule; legacy EC pools blockingenable_stretch_mode.3. Known defects still open in this PR, fixes to follow:
enable_stretch_mode/disable_stretch_modedo not plug Paxos, so the MonMap can commit before the pools and defaults;default set --rule <EC rule>breaks replicated pool creation;default_rule_suits_poolignores how many OSDs a rule puts in each zone (to use #60's check); the commit-time conversion misses a legacy enable or disable in the same epoch.4. More than two zones are refused by pool create,
default setandnum_zones; only main's individual stretch pools (ceph osd pool stretch set) span more sites.5.
osd_pool_default_replicadefaults to 0, meaning "useosd_pool_default_size", because Ceph config has no option aliases.6.
ceph osd pool defaultis served by ConfigMonitor (config caps, plus a routing exception inMonitor) and refuses values that amonsection or a monitor's local configuration overrides.Testing
ninja tests(WITH_CRIMSON=OFF; the crimson getters are not compiled locally).unittest_pool_create_params,unittest_pool_defaults,unittest_osd_monitor,unittest_osd_types,unittest_ecutil,unittest_ecfailover_with_peering,unittest_ecbackend,unittest_osdmapand the stretch EC unit tests.mon-stretch/,crush/crush-stretch.sh,mon/osd-pool-create.sh,mon/misc.sh,mon/osd-erasure-code-profile.shanderasure-code/test-erasure-code.sh. 16 passed on dccad0b08ed. The other 3 (mon-stretch-pool-defaults.sh,crush-stretch.sh,mon-stretch-replicated-placement-options.sh) failed there and pass with the last three commits. The other 16 have not been rerun since those commits.refuse osd pool stretch set for EC pools again:mon-stretch-commands.sh TEST_stretch_set_ec_poolfails, and it passes with the fix.qa/tasks/stretch_mode_disable_enable.pywas updated).Contribution Guidelines
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
- [ ] References tracker ticket
- [ ] Very recent bug; references commit where it was introduced
- [x] New feature (ticket optional)
- [ ] Doc update (no ticket needed)
- [ ] Code cleanup (no ticket needed)
- [ ] Affects Dashboard, opened tracker ticket
- [ ] Affects Orchestrator, opened tracker ticket
- [x] No impact that needs to be tracked
- [x] Updates relevant documentation
- [ ] No doc update is appropriate
- [x] Includes unit test(s)
- [x] Includes integration test(s)
- [ ] Includes bug reproducer
- [ ] No tests
<details>
<summary>Show available Jenkins commands</summary>
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.
</details>
🤖 Generated with Claude Code