diff options
author | JingLu5 <lvjing5@huawei.com> | 2017-05-25 03:58:52 +0000 |
---|---|---|
committer | Jing Lu <lvjing5@huawei.com> | 2017-06-20 04:06:12 +0000 |
commit | 9f4a06097892451912bd8251fff5482592cfe33c (patch) | |
tree | bfe3ac0dae5682fc11d0fe2134c82a717c19a96b | |
parent | 5bdc049447e44738f8a0d67228906c07fd94821e (diff) |
Terminate openstack service process using kill command in HA test cases
JIRA: YARDSTICK-659
In some openstack environment, the service process cannot be killed by killall
command but can be terminate by kill command.
This patch is about to switch to use kill command in the
fault_process_kill.bash to kill processes.
Change-Id: Iec455ee56d3f31fb5c16de5994870d1acd33f41a
Signed-off-by: JingLu5 <lvjing5@huawei.com>
(cherry picked from commit dd42ba3cafb908246da5b90c8bbbc2c7d0beb801)
-rwxr-xr-x | yardstick/benchmark/scenarios/availability/ha_tools/fault_process_kill.bash | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/yardstick/benchmark/scenarios/availability/ha_tools/fault_process_kill.bash b/yardstick/benchmark/scenarios/availability/ha_tools/fault_process_kill.bash index e0491b0d5..a6a3e96ca 100755 --- a/yardstick/benchmark/scenarios/availability/ha_tools/fault_process_kill.bash +++ b/yardstick/benchmark/scenarios/availability/ha_tools/fault_process_kill.bash @@ -16,7 +16,10 @@ set -e process_name=$1 if [ "$process_name" = "keystone" ]; then - killall -9 -u $process_name + killall -9 -u $process_name else - killall -9 $process_name + for pid in `ps aux | grep "/usr/.*/${process_name}" | grep -v grep | grep -v /bin/sh | awk '{print $2}'`; \ + do + kill -9 ${pid} + done fi |