Skip to content

Commit 7e26285

Browse files
authored
Add alternative kill commands for OpenShift (#4609)
* remove extraneous escape characters for memory hog experiment Signed-off-by: alininja <[email protected]> * remove extraneous escape characters for cpu hog experiment Signed-off-by: alininja <[email protected]> * fix suggested alternative command in tuneables table as well Signed-off-by: alininja <[email protected]> --------- Signed-off-by: alininja <[email protected]>
1 parent 8aa70f6 commit 7e26285

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

mkdocs/docs/experiments/categories/pods/pod-cpu-hog-exec.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@
166166
<tr>
167167
<td> CHAOS_KILL_COMMAND </td>
168168
<td> The command to kill the chaos process</td>
169-
<td> Default to <code>kill $(find /proc -name exe -lname '*/md5sum' 2>&1 | grep -v 'Permission denied' | awk -F/ '{print $(NF-1)}')</code>. Another useful one that generally works (in case the default doesn't) is <code>kill -9 $(ps afx | grep \"[md5sum] /dev/zero\" | awk '{print$1}' | tr '\n' ' ')</code>. In case neither works, please check whether the target pod's base image offers a shell. If yes, identify appropriate shell command to kill the chaos process </td>
169+
<td> Default to <code>kill $(find /proc -name exe -lname '*/md5sum' 2>&1 | grep -v 'Permission denied' | awk -F/ '{print $(NF-1)}')</code>. Another useful one that generally works (in case the default doesn't) is <code>kill -9 $(ps afx | grep "[md5sum] /dev/zero" | awk '{print $1}' | tr '\n' ' ')</code>. In case neither works, please check whether the target pod's base image offers a shell. If yes, identify appropriate shell command to kill the chaos process </td>
170170
</tr>
171171
<tr>
172172
<td> RAMP_TIME </td>
@@ -253,7 +253,7 @@ spec:
253253
- name: CHAOS_INJECT_COMMAND
254254
value: 'md5sum /dev/zero'
255255
# command to kill the md5sum process
256-
# alternative command: "kill -9 $(ps afx | grep \"[md5sum] /dev/zero\" | awk '{print$1}' | tr '\n' ' ')"
256+
# alternative command: "kill -9 $(ps afx | grep "[md5sum] /dev/zero" | awk '{print $1}' | tr '\n' ' ')"
257257
- name: CHAOS_KILL_COMMAND
258258
value: "kill $(find /proc -name exe -lname '*/md5sum' 2>&1 | grep -v 'Permission denied' | awk -F/ '{print $(NF-1)}')"
259259
- name: TOTAL_CHAOS_DURATION

mkdocs/docs/experiments/categories/pods/pod-memory-hog-exec.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@
155155
<tr>
156156
<td> CHAOS_KILL_COMMAND </td>
157157
<td> The command to kill the chaos process </td>
158-
<td> Defaults to <code>kill $(find /proc -name exe -lname '*/dd' 2>&1 | grep -v 'Permission denied' | awk -F/ '{print $(NF-1)}' | head -n 1)</code>. Another useful one that generally works (in case the default doesn't) is <code>kill -9 $(ps afx | grep \"[dd] if=/dev/zero\" | awk '{print $1}' | tr '\n' ' ')</code>. In case neither works, please check whether the target pod's base image offers a shell. If yes, identify appropriate shell command to kill the chaos process </td>
158+
<td> Defaults to <code>kill $(find /proc -name exe -lname '*/dd' 2>&1 | grep -v 'Permission denied' | awk -F/ '{print $(NF-1)}' | head -n 1)</code>. Another useful one that generally works (in case the default doesn't) is <code>kill -9 $(ps afx | grep "[dd] if=/dev/zero" | awk '{print $1}' | tr '\n' ' ')</code>. In case neither works, please check whether the target pod's base image offers a shell. If yes, identify appropriate shell command to kill the chaos process </td>
159159
</tr>
160160
<tr>
161161
<td> PODS_AFFECTED_PERC </td>
@@ -245,7 +245,7 @@ spec:
245245
components:
246246
env:
247247
# command to kill the dd process
248-
# alternative command: "kill -9 $(ps afx | grep \"[dd] if=/dev/zero\" | awk '{print $1}' | tr '\n' ' ')"
248+
# alternative command: "kill -9 $(ps afx | grep "[dd] if=/dev/zero" | awk '{print $1}' | tr '\n' ' ')"
249249
- name: CHAOS_KILL_COMMAND
250250
value: "kill $(find /proc -name exe -lname '*/dd' 2>&1 | grep -v 'Permission denied' | awk -F/ '{print $(NF-1)}' | head -n 1)"
251251
- name: TOTAL_CHAOS_DURATION

0 commit comments

Comments
 (0)