Commit 2c5f476
fix: handle None return from get_container_runtime()
The get_container_runtime() method was returning None when called
immediately after cluster creation, before any nodes reached Ready state.
This caused a TypeError: argument of type 'NoneType' is not iterable
when the code tried to check if 'docker' was in the runtime string.
Changes:
- Add retry logic with 60s timeout to get_container_runtime() to wait
for at least one node to become Ready
- Add explicit None check in SymptomFaultInjector.__init__() with
a clear error message if container runtime cannot be detected
Fixes network_delay, pod_failure, and other chaos mesh injection tasks
that were crashing on initialization.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 6c38435 commit 2c5f476
2 files changed
Lines changed: 23 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
31 | 37 | | |
32 | 38 | | |
33 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
61 | 68 | | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
66 | 78 | | |
67 | 79 | | |
68 | 80 | | |
| |||
0 commit comments