ceph-mirror/qa/standalone
Sridhar Seshasayee 252d149238 osd: add last_degraded field to pg_stat_t
Introduce a 'last_degraded' timestamp to the pg_stat_t structure to track
the initial point of redundancy loss. This field, used in conjunction
with 'last_clean', allows the manager to calculate a cluster-wide
durability score by measuring the duration of vulnerability windows.

Changes:
1) Add last_degraded (utime_t) to pg_stat_t in osd_types.h.
2) Increment pg_stat_t encoding version to 31. The decode logic
   defaults last_degraded to last_clean for backward compatibility
   during rolling upgrades.
3) Update operator==, dump(), and generate_test_instances() to
   support ceph-dencoder testing and JSON output.
4) Implement latching logic in PeeringState::prepare_stats_for_publish():
   - A PG is considered vulnerable if in DEGRADED or UNDERSIZED state.
   - last_degraded is set to 'now' only if it is <= last_clean,
     effectively latching the timestamp to the start of the failure
     event until the PG next becomes clean.
5) Standalone tests to verify:
   - The last_degraded timestamp latching logic.
   - Verify last_degraded timestamp is modified when OSDs are marked 'out' for
     draining purposes in which case PGs are marked undersized.
6) Release note the addition of 'last_degraded' field to PG stats.

Fixes: https://tracker.ceph.com/issues/76604
Signed-off-by: Sridhar Seshasayee <sridhar.seshasayee@ibm.com>
2026-06-04 19:44:56 +05:30
..
c2c qa: verify the benefits of mempool cacheline optimization 2021-04-30 12:11:13 +08:00
crush qa: drop XMLSTARLET variable, use xmlstarlet directly 2024-08-25 13:22:08 +02:00
erasure-code mon: Add health checker for deprecated EC plugins and techniques 2026-05-20 11:31:53 +01:00
mgr qa/standalone/mgr/balancer.sh: adapt test 2020-04-14 00:05:02 +00:00
misc Merge pull request #68048 from sseshasa/wip-fix-max-criteria-in-phase1 2026-04-13 15:14:24 +05:30
mon qa,src: replace deprecated egrep/fgrep with grep -E/grep -F 2026-03-29 14:39:07 +02:00
mon-stretch mon [stretch-mode]: Allow a max bucket weight diff threshold 2026-02-06 22:05:07 +00:00
osd osd: add last_degraded field to pg_stat_t 2026-06-04 19:44:56 +05:30
osd-backfill qa/standalone: osd-backfill-space.sh 2026-02-17 19:50:19 +00:00
scrub qa,src: replace deprecated egrep/fgrep with grep -E/grep -F 2026-03-29 14:39:07 +02:00
special qa/standalone: always decode output from check_output() 2020-09-03 13:09:16 +08:00
ceph-helpers.sh Merge pull request #67715 from NitzanMordhai/wip-nitzan-is_pg_clean-hang-after-teardown 2026-05-11 13:15:14 -05:00
README qa: Add support for specifying sub-tests with run-standalone.sh 2017-08-10 08:30:47 -07:00

qa/standalone
=============

These scripts run standalone clusters, but not in a normal way.  They make
use of functions ceph-helpers.sh to quickly start/stop daemons against
toy clusters in a single directory.

They are normally run via teuthology based on qa/suites/rados/standalone/*.yaml.

You can run them in a git checkout + build directory as well:

  * The qa/run-standalone.sh will run all of them in sequence.  This is slow
     since there is no parallelism.

  * You can run individual script(s) by specifying the basename or path below
    qa/standalone as arguments to qa/run-standalone.sh.

../qa/run-standalone.sh misc.sh osd/osd-dup.sh

  * Add support for specifying arguments to selected tests by simply adding
    list of tests to each argument.

../qa/run-standalone.sh "test-ceph-helpers.sh test_get_last_scrub_stamp"