Bugfix: fix HA test case tc046 19/34219/1
authorJingLu5 <lvjing5@huawei.com>
Thu, 4 May 2017 06:46:04 +0000 (06:46 +0000)
committerJing Lu <lvjing5@huawei.com>
Thu, 4 May 2017 09:37:05 +0000 (09:37 +0000)
The original way to kill keystone service didn't work anymore.
this patch uses killall -u to kill keystone processes.

Change-Id: I553b716f17a5ab7e57630468517642a92f06dd27
Signed-off-by: JingLu5 <lvjing5@huawei.com>
(cherry picked from commit 909606466c50aab19017b6e6cedd3e213aff7c27)

yardstick/benchmark/scenarios/availability/ha_tools/check_process_python.bash
yardstick/benchmark/scenarios/availability/ha_tools/fault_process_kill.bash
yardstick/benchmark/scenarios/availability/ha_tools/start_service.bash

index 7c275f7..9625780 100755 (executable)
@@ -15,4 +15,4 @@ set -e
 
 process_name=$1
 
-ps aux | grep -e $process_name | grep -v grep | wc -l
+ps aux | grep -e $process_name | grep -v grep | grep -v /bin/sh | wc -l
index d0e2f16..e0491b0 100755 (executable)
@@ -15,4 +15,8 @@ set -e
 
 process_name=$1
 
-killall -9 $process_name
+if [ "$process_name" = "keystone" ]; then
+    killall -9 -u $process_name 
+else
+    killall -9 $process_name
+fi
index c1bf8b7..3164c44 100755 (executable)
@@ -15,4 +15,8 @@ set -e
 
 service_name=$1
 
-service $service_name start
+if [ "$service_name" = "keystone" ]; then
+    service apache2 start
+else
+    service $service_name start
+fi