mirror of
https://github.com/jmcorgan/fips.git
synced 2026-07-30 19:46:15 +00:00
Move examples/docker-network/ to testing/static/ and add testing/chaos/ as a new stochastic simulation harness. testing/static/ — Static 5-node test harness: - Fixed mesh, chain, and mesh-public topologies with docker compose - Manual test scripts (ping, iperf, netem) - Build script, config generation, key derivation testing/chaos/ — Stochastic network simulation: - Python orchestrator generating N-node FIPS meshes with dynamic network conditions, driven by reproducible YAML scenarios - Topology generation: random geometric, Erdos-Renyi, or chain graphs with BFS connectivity guarantee - Per-link netem: HTB classful qdiscs with u32 filters for per-peer impairment (delay, loss, jitter), stochastic mutation across configurable policy profiles - Per-link bandwidth pacing: HTB rate limiting with configurable tiers (1/10/100/1000 mbps) randomly assigned per edge - Link flaps: tc netem 100% loss with graph connectivity protection - Node churn: docker stop/start with netem re-application on restart, shared down_nodes tracking across all managers - Traffic generation: random iperf3 sessions between node pairs - Down-node guards: all docker exec callers check container liveness, auto-detect crashed containers via is_container_running() safety net - Log collection and post-run analysis (panics, errors, sessions, MMP metrics, tree reconvergence) - chaos.sh wrapper with --seed, --duration, --verbose, --list options - Four scenarios: smoke-10, chaos-10, churn-10, churn-20
54 lines
1.0 KiB
YAML
54 lines
1.0 KiB
YAML
scenario:
|
|
name: "chaos-10"
|
|
seed: 42
|
|
duration_secs: 120
|
|
|
|
topology:
|
|
num_nodes: 10
|
|
algorithm: random_geometric
|
|
params:
|
|
radius: 0.5
|
|
ensure_connected: true
|
|
subnet: "172.20.0.0/24"
|
|
ip_start: 10
|
|
|
|
netem:
|
|
enabled: true
|
|
default_policy:
|
|
delay_ms: { min: 5, max: 50 }
|
|
jitter_ms: { min: 1, max: 10 }
|
|
loss_pct: { min: 0, max: 2 }
|
|
mutation:
|
|
interval_secs: { min: 15, max: 30 }
|
|
fraction: 0.3
|
|
policies:
|
|
normal:
|
|
delay_ms: [5, 20]
|
|
loss_pct: [0, 1]
|
|
degraded:
|
|
delay_ms: [50, 100]
|
|
jitter_ms: [10, 30]
|
|
loss_pct: [3, 8]
|
|
terrible:
|
|
delay_ms: [100, 200]
|
|
jitter_ms: [30, 60]
|
|
loss_pct: [10, 20]
|
|
|
|
link_flaps:
|
|
enabled: true
|
|
interval_secs: { min: 20, max: 60 }
|
|
max_down_links: 2
|
|
down_duration_secs: { min: 10, max: 30 }
|
|
protect_connectivity: true
|
|
|
|
traffic:
|
|
enabled: true
|
|
max_concurrent: 3
|
|
interval_secs: { min: 10, max: 30 }
|
|
duration_secs: { min: 5, max: 15 }
|
|
parallel_streams: 4
|
|
|
|
logging:
|
|
rust_log: "info"
|
|
output_dir: "./sim-results"
|