diff options
author | Jing Lu <lvjing5@huawei.com> | 2017-06-20 08:13:20 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-06-20 08:13:20 +0000 |
commit | 9f576f22b8233f4baea14e42786c1a07f8afecd9 (patch) | |
tree | 6685a3035fb961799c06cbaa8147a7fb5cf12fa1 | |
parent | a19d16bca4499604894c464cd9e2435bf85edefd (diff) | |
parent | 9f4a06097892451912bd8251fff5482592cfe33c (diff) |
Merge "Terminate openstack service process using kill command in HA test cases" into stable/danube
-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 |