Skip to content

Commit 85ccefe

Browse files
roachprod: add chaos CLI for failure injection
This commit introduces the `roachprod chaos` command tree, providing CLI support for the failure injection library to test cluster resilience under various failure scenarios. Changes: - Add `chaos` root command with global flags for controlling failure duration and cleanup behavior - Implement network failure commands: - `chaos network partition bidirectional`: complete network splits - `chaos network partition asymmetric`: directional traffic dropping - `chaos network latency`: artificial network delay injection Example usage: roachprod chaos network partition asymmetric mycluster \ --src 1,2 --dest 3,4 --direction incoming \ --wait-before-cleanup 10m Epic: none Release note: None
1 parent 6816c43 commit 85ccefe

File tree

5 files changed

+743
-0
lines changed

5 files changed

+743
-0
lines changed

pkg/cmd/roachprod/cli/BUILD.bazel

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ go_library(
44
name = "cli",
55
srcs = [
66
"bash_completion.go",
7+
"chaos.go",
8+
"chaos_network.go",
79
"commands.go",
810
"flags.go",
911
"handlers.go",
@@ -22,7 +24,9 @@ go_library(
2224
"//pkg/roachprod/cloud",
2325
"//pkg/roachprod/config",
2426
"//pkg/roachprod/errors",
27+
"//pkg/roachprod/failureinjection/failures",
2528
"//pkg/roachprod/install",
29+
"//pkg/roachprod/logger",
2630
"//pkg/roachprod/roachprodutil",
2731
"//pkg/roachprod/ssh",
2832
"//pkg/roachprod/ui",

0 commit comments

Comments
 (0)