feat(tasks): add run_network_disruption task and rewrite blackout playbook#219
Open
parithosh wants to merge 2 commits into
Open
feat(tasks): add run_network_disruption task and rewrite blackout playbook#219parithosh wants to merge 2 commits into
parithosh wants to merge 2 commits into
Conversation
New task driving disruptoor declaratively from playbooks: - actions: set (replace whole state), update (ETag-guarded merge by entry name with removeNames support, retried on concurrent writes), clear (heal everything) - partition/isolation/shaping entries are passed through verbatim (wire format of PUT /v1/state), so new disruptoor fields need no assertoor changes; server-side validation errors are surfaced in the task failure - built-in healthz wait (awaitApiTimeout/pollInterval) before acting - outputs read back via GET /v1/state (reflects applied reality): appliedState + partition/isolation/shaping counts Rewrites playbooks/dev/single-node-blackout-recovery.yaml on top of it: the two-partition workaround plus jq counterparty enumeration collapse into a single disruptoor isolation, and all run_shell/curl plumbing disappears (193 -> 135 lines, zero shell). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A target matching multiple containers is isolated as a group (traffic among its members keeps flowing); per-container blackouts need one isolation each. Also add whole-participant and variable-driven-target examples to the task README. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a native
run_network_disruptiontask that drives a disruptoor instance declaratively from playbooks — the task type planned as step 3 of disruptoor's design doc — and rewritesplaybooks/dev/single-node-blackout-recovery.yaml(#218) on top of it.Task design
set(replace the whole disruptoor state),update(read-merge-write: replaces entries by name, appends new ones, drops names inremoveNames; guarded byIf-Matchand retried on concurrent writes — lets playbooks compose disruptions, e.g. keep a baseline jitter while toggling a blackout),clear(heal everything).partitions/isolations/shapinggo to disruptoor verbatim (wire format ofPUT /v1/state), so new disruptoor fields never require assertoor changes. Assertoor only enforces unique non-empty entry names (needed for merge); disruptoor's precise validation errors are surfaced in the task failure.awaitApiTimeout/pollIntervalpoll healthz before acting, replacing sleep + curl shell tasks.appliedState(read back viaGET /v1/state, which reflects applied reality) pluspartitionCount/isolationCount/shapingCount.Playbook rewrite
Supersedes the
run_shell/curl/jq version from #218: the two-partition workaround and the jq counterparty enumeration (with itstotalCountoutput dependency) collapse into a single disruptoor isolation, whose counterparty group disruptoor computes as the complement of the target — 193 → 135 lines, zero shell, works unchanged on any topology. A leadingaction: cleartask doubles as a fail-fast health check and stale-state cleanup. Runtime semantics are identical to what was validated on glamsterdam-devnet-7 in #218: the target CL loses all traffic including to its own EL/VC, while the target's EL keeps its network peers.Dependencies
isolationsprimitive (feat: add isolations primitive to v1 state disruptoor#13); older disruptoor versions reject the unknown field with a clear 400.Testing
go build ./...and the fullgo test ./...suite green;golangci-lint run --new-from-rev=origin/masterreports 0 issues.isolationsvia aconfigVarsjq expression through the vars system.assertoor validate; playbook index regenerated viamake generate-playbook-index.🤖 Generated with Claude Code