Skip to content

qa: EC stretch cluster tests and suites - #72644

Merged
aainscow merged 40 commits into
ceph:mainfrom
aainscow:wip-ec-stretch-qa
Nov 14, 2026
Merged

aainscow merged 40 commits into
ceph:mainfrom
aainscow:wip-ec-stretch-qa

Conversation

@aainscow

@aainscow aainscow commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

This is the QA half of the EC stretch cluster work (stretchy-C, #67879). It needs the code half, #72643, so the two go in together. This PR changes only qa/.

Reading the commits

The commits before this PR's own are the code PR, #72643, with its PREREQ: copies of #68773; it describes them. This PR's own commits are the ones that change only qa/, after the code PR's last commit:

  • The story commits, below.
  • FIXUP: commits from review and testing, each naming the story commit that it is to be squashed into before merge. Approved FIXUPs are squashed into their story commits. Where several FIXUPs of one story commit still await review, they are combined into one whose message lists them in order.

Each commit's author is the author of most of its lines; every contributor will be credited in the Signed-off-by lines.

The story

One commit per subject. The fixes and tests added while testing this split, and the fixes from earlier reviews, are squashed into the commit of their subject; newer ones are the FIXUP: commits on top.

  • qa/tasks: create pools over zones in teuthology
  • qa/suites/rados: add zone maps to EC thrash
  • qa/standalone/crush: test stretch rules and pools over zones
  • qa/standalone: test pools over zones, pool defaults and stretch mode
  • qa: add stretch mode teuthology tests for erasure coded pools
  • qa: add stretch_zone_thrash and the thrash-erasure-code-stretch suite
  • qa/suites/rados/upgrade: check stretch pool fields after an upgrade
  • qa: add thrash-stretch suite for stretched replica pool zone thrashing
  • qa/suites/upgrade: stretch upgrades from Tentacle, with a zone lost before the commit

The .qa links of the new suite directories are in the commits that create the directories.

The upgrade suites commit with require-osd-release vampire, the release at which the code PR converts the stretch pools. The umbrella-x and the new tentacle-x suites check the pool fields across that commit; tentacle-x/stretch-zone-loss also runs a client load through a zone loss before the commit and commits while the zone is down.

Testing

These standalone suites pass, run one at a time on a GCC Debug build of this branch's code: all 24 in qa/standalone/mon-stretch/, plus crush/crush-stretch.sh, mon/osd-pool-create.sh and mon/osd-erasure-code-profile.sh. The last run also covered the new TEST_commit_warns_of_unconverted_pools and mon/misc.sh; it was on code without three later code FIXUPs (osd pool set replica with an OSD failure domain, the raw used rate of EC pools over zones, and the dashboard and osdmaptool flag lists).

Teuthology, on an earlier push: upgrade/umbrella-x 2az and 3az passed. The three upgrade/tentacle-x jobs failed on bugs in the suites, fixed by a FIXUP that is now squashed into the tentacle-x story commit: the stretch suites lacked upgrade_ignorelist_health.yaml, and a ; in an echo of stretch-zone-loss stopped that job at the first zone loss. A rerun on 2026-10-29 passed all three. With this branch's QA FIXUPs, rados/singleton's mon-stretch-ec-pool passed 3 of 3: https://pulpito.ceph.com/aainscow-2026-11-02_11:16:48-rados:singleton-wip-aainscow-stretch-poolmig-qa-261030-distro-default-smithi/

Every QA FIXUP is now squashed into its story commit, on Callum's "good to merge everything"; a FIXUP whose lines a later story owns went into that story. The last push changed no file.

Known issues (not fixed here)

  • rados/singleton's stretch-ec-mode-5-mons-8-osds cannot pass as written: its profile has the host failure domain with 2 hosts in each zone.
  • The thrash suites have not been run in teuthology.
  • Main's TEST_stretch_set_ec_pool in qa/standalone/mon-stretch/mon-stretch-commands.sh (from mon/OSDMonitor: add missing checks to the stretch pool and stretch mode commands #72416) expects the refusal message that the code PR changes. This PR's version of the test replaces it, so mon-stretch-commands.sh passes only with both PRs.
  • "Check for Incompatible Licenses" cannot run on a diff of more than 20,000 lines, which this PR has with the code PR's commits.

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_01D3mWcdojVQJ4E9Vmhy5EP5

@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Config Diff Tool Output

+ added: osd_pool_default_root (global.yaml.in)
+ added: osd_pool_default_num_zones (global.yaml.in)
+ added: osd_pool_default_osd_failure_domain (global.yaml.in)
+ added: osd_pool_default_class (global.yaml.in)
+ added: osd_pool_default_zone_failure_domain (global.yaml.in)
! changed: mon_stretch_pool_size: old:  (mon.yaml.in)
! changed: mon_stretch_pool_size: new: [LEGACY] Pool size that ceph mon enable_stretch_mode gives replicated pools until require_osd_release reaches the release with per-pool num_zones; half of it becomes osd_pool_default_size then (mon.yaml.in)
! changed: mon_stretch_pool_min_size: old:  (mon.yaml.in)
! changed: mon_stretch_pool_min_size: new: [LEGACY] Pool min_size, counted over both zones, that ceph mon enable_stretch_mode gives replicated pools until require_osd_release reaches the release with per-pool num_zones; each zone needs this value divided by two, rounded up (mon.yaml.in)
! changed: osd_pool_default_min_size: old: Sets the minimum number of written replicas for objects in the pool in order to acknowledge an I/O operation to the client.  If minimum is not met, Ceph will not acknowledge the I/O to the client, **which may result in data loss**. This setting ensures a minimum number of replicas when operating in ``degraded`` mode. The default value is ``0`` which means no particular minimum. If ``0``, minimum is ``size - (size / 2)``. (global.yaml.in)
! changed: osd_pool_default_min_size: new: Sets the minimum number of written replicas for objects in the pool in order to acknowledge an I/O operation to the client.  If minimum is not met, Ceph will not acknowledge the I/O to the client, **which may result in data loss**. This setting ensures a minimum number of replicas when operating in ``degraded`` mode. The default value is ``0`` which means no particular minimum. If ``0``, minimum is ``replica - (replica / 2)``, where ``replica`` is the number of copies in each zone (the ``size`` of a pool in one zone). (global.yaml.in)
! changed: osd_pool_default_min_size: old: Sets the minimum number of written replicas for objects in the pool in order to acknowledge an I/O operation to the client. If minimum is not met, Ceph will not acknowledge the I/O to the client, which may result in data loss. This setting ensures a minimum number of replicas when operating in degraded mode. The default value is 0 which means no particular minimum. If 0, minimum is size - (size / 2). (global.yaml.in)
! changed: osd_pool_default_min_size: new: Sets the minimum number of written replicas for objects in the pool in order to acknowledge an I/O operation to the client. If minimum is not met, Ceph will not acknowledge the I/O to the client, which may result in data loss. This setting ensures a minimum number of replicas when operating in degraded mode. The default value is 0 which means no particular minimum. If 0, minimum is replica - (replica / 2), where replica is the number of copies in each zone (the size of a pool in one zone). (global.yaml.in)
! changed: osd_pool_default_size: old:  (global.yaml.in)
! changed: osd_pool_default_size: new: A replicated pool over num_zones zones gets num_zones times this many copies, so this option is the default replica of a pool, not its size. It keeps the name size for backward compatibility; for a pool of one zone, replica and size are the same. (global.yaml.in)
! changed: osd_pool_default_size: old:  (global.yaml.in)
! changed: osd_pool_default_size: new: ['osd_pool_default_num_zones'] (global.yaml.in)
! changed: osd_pool_default_size: old: the number of copies of an object for new replicated pools (global.yaml.in)
! changed: osd_pool_default_size: new: the number of copies in each zone of an object for new replicated pools (global.yaml.in)
! changed: osd_pool_default_size: old: Sets the number of replicas for objects in the pool. The default value is the same as ``ceph osd pool set {pool-name} size {size}``. (global.yaml.in)
! changed: osd_pool_default_size: new: Sets the number of replicas in each zone for objects in new replicated pools, the ``replica`` of the pool. A pool over ``num_zones`` zones gets ``num_zones`` times this many copies. The option keeps the name ``size`` for backward compatibility; for a pool of one zone, ``replica`` and ``size`` are the same. The default value is the same as ``ceph osd pool set {pool-name} replica {replica}``. (global.yaml.in)

The above configuration changes are found in the PR. Please update the relevant release documentation if necessary.
Ignore this comment if docs are already updated. To make the "Check ceph config changes" CI check pass, please comment /config check ok and re-run the test.

@aainscow
aainscow force-pushed the wip-ec-stretch-qa branch 5 times, most recently from 9fec0a9 to 46313fa Compare October 14, 2026 04:31
@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@aainscow
aainscow force-pushed the wip-ec-stretch-qa branch 3 times, most recently from 30b578d to e5053bc Compare October 14, 2026 16:03
@aainscow
aainscow requested a review from CJamesIBM October 14, 2026 16:03
@aainscow
aainscow force-pushed the wip-ec-stretch-qa branch 2 times, most recently from d23f2fe to 25132e6 Compare October 14, 2026 18:38
aainscow and others added 5 commits November 13, 2026 15:22
Pool migration and pools over zones each rewrote the osd pool create
handler, and pool migration shares it with osd pool migrate. After the
rebase, osd pool migrate kept the handler of pool migration: it took none
of the zone arguments, skipped the checks of osd pool create and the
upgrade guards of num_zones, and created a target of one zone, so
migrating a pool over two zones silently dropped its second zone.

osd pool migrate now takes the arguments of osd pool create, and the two
commands share its handler again. The steps that only a migration has are
kept as they were: its guards, the rename of the source pool, the refusal
of a feature-losing migration, the confirmation that a migration with no
arguments needs, and the setup of the migration in prepare_new_pool(). A
migration with no arguments gives its target the source pool's settings,
as before, and now its num_zones and replica as well; with any argument,
the target takes the arguments and the defaults, as a new pool does.

Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
The target of osd pool migrate takes the source pool's name. A migration
with no arguments shared the source's CRUSH rule and erasure code profile
with its target, and a target that needed a new rule named after the pool
silently used the source's rule of that name, which was made for another
profile.

The target now shares a rule or profile only if the command names it.
Otherwise it gets its own rule, named after it: a copy of the source's rule
for a migration with no arguments, a copy of the default rule for a
replicated pool of one zone, or a new rule for its profile and zones. An
erasure coded target gets its own profile, <pool>-k<k>-m<m>, as osd pool
create gives one, with the contents of the source's profile for a migration
with no arguments. The source pool's own rule and profile take the suffix
that the source pool takes, for example myrule.migrate-1, unless another
pool uses them or they are the default replicated rule or the default
profile. If a name that the migration needs is taken, the command fails with
EEXIST.

A target that keeps k and m but changes other contents of the profile, such
as a failure domain, generates its profile under the name of the source's
own profile. The source's profile gets its new name, and the old name the
target's contents, in an update of their own, and the target is created
once that is committed, as creating a pool reads only committed profiles.

The target's rule is created in the same OSDMap as the pool and the renames,
so prepare_new_pool() checks a rule against the pending CRUSH map, as does
the scan that queues the PGs of new pools for creation: it skipped a pool
whose rule was not yet committed, and the OSDs never created its PGs. A
failure undoes every change that the command made, and gives a renamed
profile its old name and contents back.

The monitors run a command again when an election cancels its reply. A
rerun of osd pool migrate found the pool it had started migrating to be part
of a migration and failed with EINVAL, although the migration had started.
Creating the first pool over two zones sets the cluster stretch flags, which
holds an election, so a migration to two zones hit this whenever it set them.

On a pool that is the target of a migration, a migration with no arguments
now succeeds and changes nothing. One with arguments succeeds and changes
nothing if the pool has the layout that they ask for: its type, zones, size,
erasure code profile and EC optimizations, a rule with the same steps as the
rule they would give it, and the value of each other argument given; it
fails with EINVAL as before if not. A pool that is the source of a migration
still cannot be migrated.

Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
…sd_release

Nothing tested that the mon refuses an OSD of an earlier release once
require-osd-release is set. Stop osd.3, upgrade the rest of the cluster
from umbrella and set require-osd-release, then check that osd.3, still
on umbrella, stays down, and that it joins once its node is upgraded.

Setting vampire also commits the upgrade to pools over zones, so the
monitors refuse the connection of osd.3, which lacks OSD_STRETCH_ZONES,
before it can send its boot message, and never log that they disallowed
its boot. The test checks the OSD's log for that refusal instead, then
that the OSD stays down.

The test is bare metal because cephadm will not leave one OSD on an
earlier release.

The suite names the release it upgrades from and the release it sets
require-osd-release to, so the release checklist gets a step to update
it for each new release, like the other upgrade suites.

Fixes: https://tracker.ceph.com/issues/75563
Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
The ceph task gains a crush_zone_setup step. When the pool-config
override has a crush_map_config, it adds a datacenter bucket under root
default for each zone, moves the listed OSDs, or hosts with their OSDs,
into it, and sets each OSD's crush_location so that the OSD keeps that
location when it restarts. It also sets the zone monitors' locations
and puts the tiebreaker monitor in datacenter tiebreak.

CephManager.create_pool() passes num_zones to ceph osd pool create as
--num_zones and, when no erasure code profile is named,
osd_failure_domain as --osd_failure_domain; pool_type='erasure' without
a profile creates an erasure coded pool with the default profile.
create_erasure_code_crush_rule() builds the rule with ceph osd crush
rule create-erasure <rule> <profile> --num_zones when num_zones is
above 1. New helpers is_recovering_stretch_mode(),
wait_for_degraded_stretch_mode() and wait_for_healthy_stretch_mode()
read the stretch mode state from ceph osd dump.

The rados and radosbench tasks pass num_zones from pool-config to pool
and rule creation, and take osd_failure_domain from the failure_domain
of crush_map_config. The rados task creates the erasure code profile
and rule at the start of every run, as they are now deleted with the
last pool that uses them.

Signed-off-by: Callum James <[email protected]>
Assisted-by: Claude Code
The erasure code thrash suites get a num_zones layer under
ec_optimizations/on. num_zones/1 holds the profiles of
ec_optimizations/on, and num_zones/2 stretches the pool over two
datacenter zones with a crush_map_config: the OSD failure domain,
half the OSDs and one monitor in each zone, and mon.c as tiebreaker.

thrash-erasure-code splits its 16 OSDs into osd.0-7 with mon.a and
osd.8-15 with mon.b, and runs the profiles with k+m of at most 4
over two zones: default, isa and jerasure k=2 m=1, jerasure k=3
m=1, and jerasure k=2 m=2 with its own rule.

thrash-erasure-code-big splits its 12 OSDs into osd.0-5 with mon.a
and osd.6-11 with mon.b, and runs jerasure k=2 m=2 with its own
rule over two zones, keeping at least 10 OSDs in: 3 or more out of
one zone would leave its PGs short of shards. It drops its m=1 profiles, with and without
ec_optimizations: no main suite combines mapgap with m=1.

DEPRECATED_EC_PLUGIN is ignored for clay, shec and jerasure
cauchy_good, and the jerasure cauchy profile's comment names
cauchy_good.

Signed-off-by: Callum James <[email protected]>
Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
@aainscow

Copy link
Copy Markdown
Contributor Author

(claude response) Pushed 5c96616: a trivial rebase onto #72643's new head 0cb5448 (main 335a1a7, with #68773 merged). These 13 commits are unchanged.

Ericmzhang and others added 10 commits November 13, 2026 15:51
Add crush-stretch.sh, which runs three monitors and checks:

- ceph osd crush rule create-erasure --num_zones 2 is refused until
  each datacenter has enough hosts with an OSD, then builds a rule that
  chooses two datacenters and, in each, hosts with chooseleaf indep;
  also for rules with a device class.
- ceph osd pool create --num_zones 2, erasure coded with --k and --m
  and replicated with --replica 2, makes the same checks, also for a
  device class, and generates the rule, with chooseleaf firstn for the
  replicated pool; the replicated pool gets size 4 and min_size 1, and a
  profile with crush-osd-failure-domain=osd gives a rule over OSDs.
- In stretch mode, once a third datacenter exists, a pool on a rule
  that uses it is refused by ceph osd pool create (the cluster no
  longer has two datacenters) and by ceph osd pool set num_zones 2 (the
  rule uses other datacenters than stretch mode), and a pool whose zone
  failure domain is not the stretch mode bucket type is refused.
- ceph mon enable_stretch_mode moves an existing pool to the stretch
  rule, and two-zone pools can use rules of different device classes.
- ceph osd pool set num_zones 1 on the last two-zone pool, in healthy,
  degraded and recovery stretch mode.

TEST_stretch_ec_stretch_set checks that ceph osd pool stretch set
refuses an erasure coded pool, and that ceph osd pool set num_zones 2
stretches two of them, which then go clean.

Signed-off-by: Eric Zhang <[email protected]>
New scripts in qa/standalone/mon-stretch, several sharing the sourced
mon-stretch-helpers.sh:

- mon-stretch-pool-defaults.sh: ceph osd pool default get and set,
  where values come from, the checks set makes, refusal of overridden
  values, and the POOL_DEFAULT_CONFIG_OVERRIDE warning.
- mon-stretch-enable-disable.sh: ceph mon enable_stretch_mode and
  disable_stretch_mode change every pool and the defaults, can be run
  again, and refuse a legacy EC pool or defaults that would fail.
- mon-stretch-upgrade.sh: before require_osd_release reaches umbrella,
  pool creation (CLI and librados), ceph osd pool default set and
  ceph osd pool set num_zones are refused, and enable_stretch_mode
  behaves as before; the commit turns stretch mode into defaults.
  STRETCH_MODE_POOL_NOT_CONVERTED names a pool that the commit cannot
  split, before it, while a new rule can still fix the pool, and
  after it.
- osd-pool-set-replica.sh: ceph osd pool set num_zones and replica for
  replicated and erasure coded pools, and the rules they use.
- Pool creation: single-zone replicated pools honour --root,
  --osd_failure_domain and --class, with the default rule if it places
  them so and a rule of their own otherwise, and refuse
  --zone_failure_domain; the legacy positional syntax, an EC pool over
  two zones from the default profile, and failed creates that leave
  neither a pool nor a stretch mode MonMap.
- Stretch mode states: an EC pool created in degraded stretch mode, and
  leaving stretch mode during recovery by deleting or unstretching the
  last stretched pool.
- mon-stretch-ec-peered-interval.sh: a past interval in which an EC
  pool over two zones could only be peered, in degraded stretch mode,
  does not keep its PG down once the mandatory zone is back at
  min_size with the latest writes.
- mon-stretch-leader-zone-down.sh: losing the zone of the leader Monitor
  after its OSDs are marked down enters degraded stretch mode.

mon-stretch-commands.sh checks that ceph osd pool stretch set and unset
refuse an EC pool. mon-stretch-fail-recovery.sh and
mon-stretch-uneven-crush-weights.sh gain TEST_EC_* variants for a
two-zone k=2 m=1 pool, which run only when named, as the scripts pick
up lowercase TEST_ names; the latter shares its cluster setup between
its tests. osd-pool-create.sh tests --k and --m with CRUSH parameters,
and osd-crush.sh checks that a profile is deleted with its last pool.

osd-pool-create.sh also tests osd pool migrate with the arguments of osd
pool create: a migration with no arguments, the checks that refuse a
migration, the rule and erasure code profile that a target gets and the
names that the source's take, a name that is already taken, and a
migration that the monitors run again.

Signed-off-by: Alex Ainscow <[email protected]>
Add erasure coded versions of the stretch cluster tests, each using a
two-zone k=2 m=1 pool:

- rados/singleton/all/mon-stretch-ec-pool.yaml runs the workunit
  mon/mon-stretch-ec-pool.sh, which places mon.g in a third datacenter
  as the tiebreaker and tries ceph osd pool stretch set, show and unset
  on an erasure coded pool, and then tasks/stretch_ec_cluster.py. That
  creates the pool from a k=2 m=1 profile with
  CephManager.create_pool(num_zones=2), fails and restores the OSDs and
  monitors of a datacenter, and checks PG activity, degraded and
  recovery stretch mode in the OSDMap and MonMap, I/O while a site is
  down and object contents after recovery.
- rados/singleton/all/stretch-ec-mode-5-mons-8-osds.yaml sets up the
  cluster with mon/mon-stretch-ec-mode-5-mons-8-osds.sh, whose profile
  places the shards on OSDs as each datacenter has two hosts, and runs
  tasks/stretch_ec_mode_disable_enable.py, which moves the pool between
  one and two zones with ceph osd pool set num_zones, also in degraded
  stretch mode, and checks the rule each change gives the pool.
- netsplit/tests/stretch-ec-2-dc-1-arbiter-stretch-cluster-netsplit.yaml
  runs test_netsplit against the pool that
  mon/setup_stretch_ec_cluster.sh creates from its k=2 m=1 profile with
  --num_zones 2.
- rados/singleton/all/rados-api-zones.yaml runs the librados API tests
  that need two zones (rados/test_rados_api_zones.sh), and rados/test.sh
  runs ceph_test_rados_api_ec_pool_create_pp with the other API tests,
  where its tests over zones skip themselves.

The replicated stretch_mode_disable_enable.py now creates its pool with
--num_zones 2 --replica 2, as a pool over several zones has no settable
size. stretch_cluster.py calls _pg_partial_active() in its wait instead
of passing the method, which was always true.

rados-api-zones.yaml ignores MON_DOWN, as the other stretch suites do.
stretch_ec_cluster.py bounds its benches so that a parallel workload
cannot fill the disk or hang the job: at most 256 objects (about 1 GiB)
per write, a 30 s background bench while a datacenter is down, and a
hard timeout that kills a bench left waiting on an unreachable
cluster.

Co-authored-by: Callum James <[email protected]>
Signed-off-by: Callum James <[email protected]>
The stretch_zone_thrash task fails whole zones of a cluster with a
two-zone pool. It takes the zones' OSDs and monitors from the
crush_map_config in pool-config, waits until a pool with
is_stretch_pool exists, and then repeatedly picks a random zone, stops
its OSDs and monitors, waits for degraded stretch mode, keeps the zone
down for hold_duration seconds, restarts the monitors and waits for a
full quorum before restarting the OSDs, so that the leader no longer
counts the zone as dead, and waits until the cluster has left degraded
and recovery stretch mode. The tiebreaker monitor is never stopped.
degrade_timeout, revive_timeout and pool_timeout bound the waits,
thrash_delay separates iterations and seed fixes the choice of zones. A
failure is reported to the daemon watchdog; at the end the task waits
for a full quorum and for recovery.

The thrash-erasure-code-stretch suite runs the rados-default workload
on the fixed-4 cluster under two thrashers, zone-default (60 s down)
and zone-slow-recovery (120 s down, rejected backfills, fewer
backfills). Its erasure-code facet links on.yaml, num_zones/2 (the
two-zone profiles and crush_map_config) and fast from qa/erasure-code;
as ec_optimizations/on has no % file, a job gets either on.yaml or
num_zones/2, not both.

Signed-off-by: Callum James <[email protected]>
Assisted-by: Claude Code
Add the umbrella-x upgrade suite with a 2az and a 3az job. Each deploys
an Umbrella cluster with cephadm, runs the workunit
pool-fields-upgrade-setup.sh, upgrades to the build under test with
ceph orch upgrade, runs ceph osd require-osd-release vampire, and then
runs pool-fields-upgrade-verify.sh (both in qa/workunits/mon).

The setup script puts each of the eight OSDs on a host of its own under
datacenters dc1, dc2 and dc3 and adds a replicated rule. For 2az it
splits the OSDs between dc1 and dc2, creates a pool of size 4 and
min_size 2 on a rule that takes two hosts in each, and enables global
stretch mode with mon.c as tiebreaker. For 3az it spreads the OSDs over
the three datacenters and makes the pool a stretch pool with ceph osd
pool stretch set (bucket count 2, target 3, size 6, min_size 3).

After the upgrade the verify script checks the pool, decoded from the
earlier release's encoding. The 2az pool has num_zones 2, replica 2,
size 4 and min_size 1 per zone. The 3az pool, an individual stretch
pool, keeps one zone (num_zones 1, replica 6, size 6, min_size 3), and
its pool stretch mode fields (is_stretch_pool, bucket count 2, target 3
and its CRUSH rule) are unchanged.

Both jobs take their health ignore list from
qa/overrides/upgrade_ignorelist_health.yaml, and also ignore
CEPHADM_STRAY_HOST and the DEGRADED_STRETCH_MODE and
RECOVERING_STRETCH_MODE that global stretch mode can raise while daemons
restart.

Co-authored-by: Callum James <[email protected]>
Signed-off-by: Callum James <[email protected]>
Adds a new thrash-stretch suite that tests degraded stretch mode under continuous I/O for replica pools, mirroring thrash-erasure-code-stretch. The suite uses a 2-zone + tiebreak topology (16 OSDs, 2 replicas per zone, size=4 min_size=2) and has both default and slow-recovery configurations.

Signed-off-by: Callum James <[email protected]>
ceph mon enable_stretch_mode and disable_stretch_mode write the pool
creation defaults, osd_pool_default_size among them, to the global
section of the configuration database, and refuse to when a Monitor's
local configuration overrides one of them. The classic ceph task writes
osd_pool_default_size into every host's ceph.conf (2 from
ceph.conf.template, 3 in stretch-mode-5-mons-8-osds), so both stretch
suites that run enable_stretch_mode would fail.

The ceph task already sets cluster-conf options with ceph config set
once the Monitors and the Manager are up, before any OSD or pool exists.
An option listed there is now also left out of ceph.conf, where it would
override the database. stretch-mode-5-mons-8-osds and the netsplit
stretch test move osd_pool_default_size to cluster-conf, with the values
they had.

Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
The monitor now removes any CRUSH rule the moment no pool references it
(OSDMonitor::maybe_remove_unused_crush_rule). The workunit
(mon-stretch-pool.sh) installs replicated_rule_custom and then unsets
the pool from stretch mode, leaving the rule unused so the monitor deletes
it. The Python test's setUp then calls set crush_rule replicated_rule_custom
and gets ENOENT.

Add _ensure_custom_rule() helper and call in stretch_cluster.py,
test_netsplit_3az_stretch_pool.py, and stretch_mode_disable_enable.py.
The helper checks whether the custom rule is present and if needed
re-installs it using the same rule text as the workunit. The rule ID may change, so
callers always reference it by name. Call it in setUp after pool removal
so every test starts with the rule guaranteed to exist.

Signed-off-by: Callum James <[email protected]>
…efore the commit

The umbrella-x stretch suites start on Umbrella, which is already at
require_osd_release umbrella, so with the commit gated on umbrella they
never commit and never exercise the window before the commit.

Add tentacle-x/stretch/{2az,3az}, the same field checks from Tentacle, and
tentacle-x/stretch-zone-loss: a ceph_test_rados load on the stretched pool,
checking every read, while dc2 is lost with the mons mixed (min_size halved
and restored as before), dc1 is upgraded, dc2 is lost again and the upgrade
is committed while degraded, and dc2's OSDs, still on Tentacle, must stay
down until the upgrade finishes. The verify workunit also checks that the
commit set the OSDMap flag stretch_zones.

Not run in teuthology yet.

Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>
rados/standalone runs each workunit directory as one job, and a job that
runs for more than 6 hours is killed. mon-stretch/ now takes longer than
that: on smithi the scripts up to mon-stretch-reduce-num-zones.sh took
5h 50m, and the job was killed in that script (job 709464):
https://pulpito.ceph.com/aainscow-2026-11-04_04:35:59-rados:standalone-wip-aainscow-stretch-poolmig-qa-261103b-distro-default-smithi/709464/

Move the tests of pools over zones (pool create, pool defaults, zone
commands, num_zones and replica changes, replicated placement options)
to mon-stretch-pool/, with a workload of its own, as 0f65e5c did for
osd-backfill/. Each half takes about 4 hours. The scripts source their
helpers through $CEPH_ROOT, so they run unchanged from the new
directory.

As Callum James asked
(ceph#72644 (comment)), every
script in mon-stretch-pool/ is named mon-stretch-pool-*, and none in
mon-stretch/ is: mon-stretch-reduce-num-zones.sh,
mon-stretch-replicated-placement-options.sh and osd-pool-set-replica.sh
become mon-stretch-pool-reduce-num-zones.sh,
mon-stretch-pool-replicated-placement-options.sh and
mon-stretch-pool-set-replica.sh. mon-stretch-pool-create-degraded.sh,
which tests pool creation in degraded stretch mode and stays in
mon-stretch/, becomes mon-stretch-replicated-pool-create-degraded.sh,
beside mon-stretch-ec-pool-create-degraded.sh.

Assisted-by: Claude Code
Signed-off-by: Alex Ainscow <[email protected]>

@CJamesIBM CJamesIBM 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.

LGTM

@bill-scales bill-scales 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.

Reviewed QA changes - Approve. Other commits from other PR were reviewed and approved there.

@aainscow

Copy link
Copy Markdown
Contributor Author

jenkins test docs

@github-actions

Copy link
Copy Markdown

This is an automated message by src/script/redmine-upkeep.py.

I have resolved the following tracker ticket due to the merge of this PR:

No backports are pending for the ticket. If this is incorrect, please update the tracker
ticket and reset to Pending Backport state.

Update Log: https://github.com/ceph/ceph/actions/runs/43590135575

@github-actions

Copy link
Copy Markdown

This is an automated message by src/script/redmine-upkeep.py.

I found one or more Fixes: tags in the commit messages in

git log 794314477bd15de431a1d823d0960a7f88951eea^..794314477bd15de431a1d823d0960a7f88951eea

The referenced tickets are:

Those tickets do not reference this merged Pull Request. If this Pull Request merge resolves any of those tickets, please update the "Pull Request ID" field on each ticket. A future run of this script will appropriately update them.

Update Log: https://github.com/ceph/ceph/actions/runs/43590135575

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants