Version 1.1.3
Highlights
This patch release lands the modularity refactor (#319) — a deep cleanup of CLI wiring, chaos command plumbing, and runtime adapters. No public CLI behavior changes; existing scripts and flags continue to work. The refactor removes long-standing duplication, paves the way for a future urfave/cli v3 migration, and wires up the previously unreachable --limit flag on netem/iptables parent commands.
Fixes
--limitnow works onnetemandiptables— the parsers always read--limitbut the flag was never declared on either parent command, so user-supplied values silently became0. The flag is now wired up and respected.- Sidecar create errors include the failing image name — previously the error template duplicated the tool name (
tc,iptables) instead of the image, making debugging pull/registry issues harder. - tc/iptables sidecar cleanup tolerates already-completed removals — graceful SIGTERM during a chaos action no longer surfaces spurious errors when Podman has already reaped the sidecar.
stop/pauseactions report both primary and restart/unpause errors — when restart-after-stop or unpause-after-pause fails, both errors are returned rather than silently dropping one.- Stop CLI rejects zero
--durationearlier in parsing instead of letting it reach the runtime.
Refactor (internal)
chaos.RunOnContainersfanout helper consolidates the list → random-pick → parallel/serial → collect-errors pattern that was duplicated across all 15 chaos action implementations. New chaos actions can no longer drift from the canonical shape.- Generic
NewAction[P]CLI builder collapses the 17 chaoscmd/*.gofiles into a uniform shape (flag list + typedParamParser[P]+CommandFactory[P]). - Request value objects replace long positional arg lists on fat interface methods:
NetemRequest,IPTablesRequest,StressRequest/StressResult,RemoveOpts. Mock signatures updated accordingly. cliflags.Flagsadapter decouples chaos parsers fromurfave/cliv1, isolating the future v3 migration to a single file.pkg/runtime/podmanpackage documents the Docker SDK embedding invariant and the cgroup leaf-naming gotchas (libpod-<id>.scope/container).util.ValidateInterfaceNamecentralizes the network-interface regex previously duplicated acrossnetemandiptablesparsers.cmd/main.gosplit into 5 focused per-concern files (each ≤ 200 LOC):main.go,runtime.go,logging.go,flags.go,commands.go.pkg/runtime/docker/sidecar.goconsolidates tc and iptables sidecar lifecycle (create → start → exec → force-remove) into one helper. SidecarStopSignal: "SIGKILL"skips Podman's 10-second SIGTERM grace window.- Containerd runtime split per concern:
client.go,api.go,container.go,task.go,commands.go,cgroup.go,sidecar.go,netem.go,iptables.go,stress.go,stress_sidecar.go(every production file ≤ 250 LOC).
Tests and CI
- Local integration tests now run inside runtime VMs — Docker/containerd in Colima, Podman in
podman machine. The bats suite runs on a real kernel against real sockets instead of a fragile macOS-side proxy. - stress-ng image pinned to
0.20.01in tests and CI prepull steps. Floating:latestleft stale 0.20.00 cached locally, which lacks/cg-injectand silently skipped the inject-cgroup test. The contract is now enforced (fail, notskip). - Unit coverage gains:
pkg/chaos69% → 98.5%,pkg/chaos/lifecycle82.6% → 100%. Adds focused tests forParseGlobalParams, lifecycle constructors, and thecontext.WithoutCancelcleanup path that runs on SIGTERM during stop/pause.
Compatibility
- No API or CLI breaking changes. All existing
pumbainvocations continue to work. - Docker SDK pinned at
v28.5.2; containerd SDK v2; Go 1.26;urfave/cliv1 (v3 migration deferred).