From 9f4a06097892451912bd8251fff5482592cfe33c Mon Sep 17 00:00:00 2001 From: JingLu5 Date: Thu, 25 May 2017 03:58:52 +0000 Subject: 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 (cherry picked from commit dd42ba3cafb908246da5b90c8bbbc2c7d0beb801) --- .../scenarios/availability/ha_tools/fault_process_kill.bash | 7 +++++-- 1 file 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 -- cgit 1.2.3-korg