Skip to content

qa/standalone, test/librados: stretch test infrastructure - #46

Merged
aainscow merged 3 commits into
stretchy-Cfrom
wip-stretchy-C-pr43-03-test-infra
Oct 7, 2026
Merged

aainscow merged 3 commits into
stretchy-Cfrom
wip-stretchy-C-pr43-03-test-infra

Conversation

@aainscow

@aainscow aainscow commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Third PR split out of #43: the test infrastructure that the later PRs' tests use. It changes no product code.

  • qa/standalone: use the auth_*_required options in crush-stretch.sh. ceph-mon no longer accepts --auth-supported, so every test in crush-stretch.sh failed at its first run_mon. It now uses the same options as the other standalone tests.
  • test/librados: create the stretch EC test pool with num_zones. create_ec_pool_pp() built its two-zone pool from a named profile with a single-zone CRUSH rule, then set num_zones with a raw osd pool set and stretched the pool with osd pool stretch set. stretch set refuses erasure coded pools since mon: carry the stretch fixes proposed for main into stretchy-C #44, and a later PR refuses osd pool set num_zones. The pool is now created with one osd pool create carrying k, m and num_zones 2. RadosTestECPP creates it only on a two-zone topology.
  • qa/standalone: add helpers for the mon-stretch tests. Adds mon-stretch-helpers.sh for the mon-stretch scripts of the following PRs: run_stretch_tests, wait_for_stretch_state, pool_field, two_zone_cluster, ec_stretch_cluster_without_dc2 and enable_global_stretch_mode. No script sources it yet.

Testing

  • This branch is stretchy-C aacff39 with these three commits, rebased unchanged from stretchy-C 0ef148d. The second commit's message now says that the refusal of osd pool set num_zones follows in a later PR. The build and unit tests on this branch will follow.
  • Before the rebase, this PR built with no errors or warnings, on top of the two PRs before it, and unittest_mon_monmap and unittest_osd_monitor passed.
  • At the tip of the whole split, crush/crush-stretch.sh passed 9/9, and every mon-stretch script, including those that source the new helpers, passed.
  • RadosTestECPP needs a two-zone topology. It was built but not run.

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

ceph-mon no longer accepts --auth-supported, so every test in
crush-stretch.sh failed at the first run_mon. Use the same options as
the other standalone tests (875eab6).

Assisted-by: Claude Code
create_ec_pool_pp() built its two-zone test pool from a named profile
with a single-zone CRUSH rule, set num_zones afterwards through a raw
'osd pool set' and then gave the pool its stretch values with 'osd pool
stretch set'. Stretch set refuses an erasure coded pool since
"mon/OSDMonitor: refuse to stretch an erasure coded pool", carried from
main, and "mon/OSDMonitor: refuse osd pool set num_zones", which
follows in a later PR, refuses the raw 'osd pool set num_zones'.

A multi-zone EC pool is created from k and m with num_zones, which
builds a two-zone CRUSH rule and puts the pool in stretch mode. Create
the test pool with one 'osd pool create' carrying k, m, num_zones 2 and
the OSD failure domain the old profile used. RadosTestECPP creates this
pool only when the cluster has a two-zone topology.

Assisted-by: Claude Code
Add mon-stretch-helpers.sh, which the mon-stretch tests that follow
source, so that each stretch fix's test can live in its own script:

- run_stretch_tests runs the TEST_ functions given, or all of them,
  with a fresh cluster each;
- wait_for_stretch_state waits for the OSDMap's degraded and
  recovering stretch mode values, and pool_field reads a field of a
  pool;
- two_zone_cluster starts monitors a in dc1, b in dc2 and c as the
  arbiter, a manager, and a given number of OSDs (default 3) in each
  of dc1 and dc2, on a host each;
- ec_stretch_cluster_without_dc2 adds a 2-zone EC pool to that cluster
  and takes dc2's monitor and OSDs down, leaving degraded stretch mode;
- enable_global_stretch_mode enables global stretch mode ('ceph mon
  enable_stretch_mode') over the datacenters, with a pool on a stretch
  rule.

Assisted-by: Claude Code
@aainscow
aainscow marked this pull request as ready for review October 7, 2026 11:48
@aainscow
aainscow merged commit ce9fcea 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant