Skip to content

Commit

Permalink
Add alternative kill commands for OpenShift (#4609)
Browse files Browse the repository at this point in the history
* remove extraneous escape characters for memory hog experiment

Signed-off-by: alininja <signup@alininja.anonaddy.com>

* remove extraneous escape characters for cpu hog experiment

Signed-off-by: alininja <signup@alininja.anonaddy.com>

* fix suggested alternative command in tuneables table as well

Signed-off-by: alininja <signup@alininja.anonaddy.com>

---------

Signed-off-by: alininja <signup@alininja.anonaddy.com>
  • Loading branch information
alininja authored May 16, 2024
1 parent 8aa70f6 commit 7e26285
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions mkdocs/docs/experiments/categories/pods/pod-cpu-hog-exec.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
<tr>
<td> CHAOS_KILL_COMMAND </td>
<td> The command to kill the chaos process</td>
<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>
<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>
</tr>
<tr>
<td> RAMP_TIME </td>
Expand Down Expand Up @@ -253,7 +253,7 @@ spec:
- name: CHAOS_INJECT_COMMAND
value: 'md5sum /dev/zero'
# command to kill the md5sum process
# alternative command: "kill -9 $(ps afx | grep \"[md5sum] /dev/zero\" | awk '{print$1}' | tr '\n' ' ')"
# alternative command: "kill -9 $(ps afx | grep "[md5sum] /dev/zero" | awk '{print $1}' | tr '\n' ' ')"
- name: CHAOS_KILL_COMMAND
value: "kill $(find /proc -name exe -lname '*/md5sum' 2>&1 | grep -v 'Permission denied' | awk -F/ '{print $(NF-1)}')"
- name: TOTAL_CHAOS_DURATION
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
<tr>
<td> CHAOS_KILL_COMMAND </td>
<td> The command to kill the chaos process </td>
<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>
<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>
</tr>
<tr>
<td> PODS_AFFECTED_PERC </td>
Expand Down Expand Up @@ -245,7 +245,7 @@ spec:
components:
env:
# command to kill the dd process
# alternative command: "kill -9 $(ps afx | grep \"[dd] if=/dev/zero\" | awk '{print $1}' | tr '\n' ' ')"
# alternative command: "kill -9 $(ps afx | grep "[dd] if=/dev/zero" | awk '{print $1}' | tr '\n' ' ')"
- name: CHAOS_KILL_COMMAND
value: "kill $(find /proc -name exe -lname '*/dd' 2>&1 | grep -v 'Permission denied' | awk -F/ '{print $(NF-1)}' | head -n 1)"
- name: TOTAL_CHAOS_DURATION
Expand Down

0 comments on commit 7e26285

Please sign in to comment.