Choose what this site may use

This site uses strictly necessary cookies to work and to remember your privacy choices. With your permission it would also load content hosted by other services, such as videos, maps and fonts, which then receive your network address and device data. We do not sell or share your personal information and we run no advertising. Choose Accept all, Reject all or Customise. You can change your mind at any time through Privacy choices at the foot of every page.

  • Always on

    Needed for the site to work and to remember your privacy choices. Always on.

  • Remembers settings you choose, such as the light or dark display, in your browser.

  • Loads videos, maps and other content hosted by other services. Those services receive your address and device data.

Menu Close
In this section: Learn
Start
Guides
Domain packs
Participants
Security and privacy
Pilot kits
Operations
Ecosystem

Chaos and resilience experiments

Source docs/ops/chaos.md

On this page
  1. Experiments
  2. Results
  3. Status

Fault-injection experiments against the reference stack, each with the behaviour it must show asserted, and the game-day runbooks an operator follows when the same fault happens for real. The experiments run on one machine against the compose stack; they say how the reference programs behave, not how a deployment of them will.

OBSP_PROFILES="observability chaos" make stack-up
make chaos CHAOS=kill-replica      # one experiment; CHAOS=all for every one (the default)
make chaos-plan                    # every experiment's steps, printed, nothing touched
python3 infra/chaos/chaos.py list
File Role
infra/chaos/chaos.py the experiments: steady state, fault, assertions, recovery; results in dist/chaos/<run>/<experiment>.json
infra/chaos/latency_proxy.py a TCP proxy that adds latency or cuts a dependency on command
infra/compose/compose.chaos.yaml the chaos profile: bounds every fault to the stack
ci/jobs/chaos-nightly.sh the nightly CI job
game-days/ the runbooks

Safety. The chaos profile puts the first gateway’s store on a size-limited tmpfs volume, so filling it cannot fill the host’s disk; clock skew is injected through a flag of the federation peer and a variable of the log service, never by changing the host clock; partitions disconnect containers from the stack’s own networks. Every experiment removes its fault in a finally step, after a failed assertion too. Nothing leaves the host.

Experiments

Experiment Fault Expected behaviour (asserted) Runbook
kill-replica SIGKILL the first gateway the TLS front answers for it with a 5xx within 5 s (no hang); the other gateway keeps answering; after a restart it is healthy within 60 s with every stored entry, and accepts writes replica-loss.md
network-partition disconnect fed-b from the federation network fed-a records the partition within 60 s; the quorum side keeps writing; 60 s after rejoining no partition is recorded; fed-b holds fed-a’s writes within 90 s federation-partition.md
disk-full fill the gateway’s (bounded) store volume writes refused with 503 OBS-STORE-0001, marked retryable; reads keep working; obsp_http_responses_total counts the code (alert ObspStoreWriteFailing); writes accepted within 30 s of freeing space disk-full.md
clock-skew fed-c +120 s (beyond the skew allowance); the log service +600 s at most one lease holder per namespace in every sample over 60 s; the prober marks the future-stamped tree head not fresh (SLO-LOG-FRESH) within 90 s; both recover clock-skew.md
slow-db 300 ms per packet to a dependency, then a cut answers slow down by the delay but succeed; a cut dependency fails in under 2 s; latency back to normal after the reset slow-database.md

Slow database today and with the data plane. The reference gateway’s store is a local file, so on today’s stack the proxy sits between a client and the first gateway and the assertions are about the client’s view. When the PostgreSQL data plane is present, set OBSP_CHAOS_DB_UPSTREAM=<database host>:5432 and point the service’s database address at db-chaos:15432: the same experiment then slows and cuts the database, and the runbook says what the service must answer (503 DEPENDENCY_UNAVAILABLE, retryable, and no request held longer than its timeout).

Results

dist/chaos/<run id>/<experiment>.json (schema obsp-chaos-result/1): the profiles, the start time, the duration, PASS or FAIL, an error if a command failed, and every step and assertion with its time, verdict and detail. The nightly job stores the folder as a CI artifact.

Status

The experiments were written against the stack’s interfaces and run here in dry-run mode (make chaos-plan, in make check through tests/test_observability.py); the fault proxy and the gateway’s behaviour behind it were exercised against a gateway on the loopback interface. A full run needs a container engine, which the nightly job provides; its first results will show which assertions the reference programs meet as they stand.