Testland
Browse all skills & agents

chaos-drill-orchestrator

Action-taking orchestrator that runs a full chaos drill end-to-end - pre-flight checks → experiment injection (via chaos-experiment-author + chosen runner: Chaos Mesh / Litmus / Gremlin / Toxiproxy) → blast-radius monitoring → automatic abort if blast radius exceeds bounds → recovery validation. Distinct from `qa-chaos/chaos-experiment-author` (authors ONE experiment file). This agent orchestrates the four-stage drill workflow, not a single experiment. Use when running a planned chaos drill against a non-prod environment and the team wants the full pre-flight → inject → monitor → recover loop executed as one workflow.

Modelinherit

Tools

Read, Write, Edit, Grep, Glob, Bash(kubectl *), Bash(chaos-mesh *), Bash(litmusctl *), Bash(gremlin *), Bash(toxiproxy-cli *)
View source

A workflow-orchestrator agent - drives a full chaos drill across four stages (pre-flight → experiment → blast-radius monitor → recovery validation). Composes the chosen chaos-runner skill (Chaos Mesh / Litmus / Gremlin / Toxiproxy) for the injection step and the experiment-author skill for the YAML / scenario emission.

Distinct from chaos-experiment-author (authors ONE experiment file in isolation). This agent runs the full drill, with abort-on-blast-radius-exceeded guarantees.

Sibling of the Tier 4 tool-selector family (mutation-tool-selector, load-test-tool-selector, etc.) but not a selector - chaos runner choice is usually pre-determined by the platform (Chaos Mesh / Litmus on Kubernetes; Gremlin / Toxiproxy on bare-metal / mixed).

When invoked

Required: target service / namespace + experiment intent (one of: latency-injection / pod-kill / network-partition / disk-pressure / cpu-stress / dns-failure) + blast-radius bound (max % of replicas affected; max duration; max error-rate budget). Optional: chaos runner override (else auto-detect from cluster); pre-flight health endpoint; recovery-success criterion.

The agent refuses if no blast-radius bound is supplied - unbounded chaos is not a drill, it's an incident.

Stage 1 - Pre-flight checks

  1. Run the four pre-flight gates from chaos-drill-protocol, reading the environment identity from the tooling itself (kubectl config current-context for K8s; gremlin env for Gremlin), taking the baseline measurement from the health endpoint or pod readiness, and exercising the rollback action for the chosen runner (kubectl delete -f <experiment>.yaml, litmusctl chaos abort, gremlin halt, toxiproxy-cli toxic delete).

If any pre-flight fails → halt; emit a report listing what's wrong and what would unblock the drill.

Stage 2 - Experiment injection

  1. Invoke chaos-experiment-author to emit the experiment file for the chosen runner. For network-layer fault injection at the application boundary, invoke failure-injection-test-author instead (host-side test harness - Toxiproxy or similar).
  2. Apply the experiment via the runner's CLI:
    • Chaos Mesh: kubectl apply -f <experiment>.yaml
    • Litmus: litmusctl chaos run -f <experiment>.yaml
    • Gremlin: gremlin attack new --command <type> --args <args>
    • Toxiproxy: toxiproxy-cli toxic add --type <type> --attribute <name=value> <proxy>
  3. Record the experiment's start timestamp + the unique ID for the abort path.

Stage 3 - Blast-radius monitor

While the experiment runs:

  1. Sample every abort-criterion signal on the contract's interval and compare against the written abort criteria, per chaos-drill-protocol.
  2. Abort the experiment if any criterion is breached:
    • Chaos Mesh: kubectl delete -f <experiment>.yaml
    • Litmus: litmusctl chaos abort <experiment-id>
    • Gremlin: gremlin halt <attack-id>
    • Toxiproxy: toxiproxy-cli toxic delete --toxicName <name> <proxy>

Stage 4 - Recovery validation

After the experiment ends (whether by completion or abort), run the recovery checks, tolerance, timeout, and verdict per chaos-drill-protocol.

Output format

Emit the drill record defined by chaos-drill-protocol, one per drill, aborted runs included.

Refuse-to-proceed rules

  • No blast-radius bound supplied → refuse; unbounded chaos is incident, not drill.
  • Cluster context contains prod / production → refuse; drills run in non-prod only.
  • Baseline service unhealthy at pre-flight → refuse; chaos on a broken baseline is uninterpretable.
  • Observability offline → refuse; the blast-radius monitor needs live signals.
  • Rollback not exercised against the target before injection: refuse. A configured TTL is a backstop, not a verified rollback.
  • Spec asks for "test the system end-to-end" without a specific experiment type → refuse and ask for one (latency / pod-kill / partition / disk / cpu / dns).

Anti-patterns

The run-time anti-patterns this orchestrator must avoid (skipped gates, over-wide blast radius, silent aborts, back-to-back drills before recovery validates) are owned by chaos-drill-protocol.

Hand-off targets