From 04f6dc24a7845ee139977fa5b0c5e53aad8e99bd Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Thu, 16 Jan 2014 18:03:38 -0500 Subject: [PATCH] Fix stop_neutron metadata agent function Currently, stop_neutron fails in Jenkins because it kills itself. This patch ensure we kill only neutron metadata agent, and not the awk process in itself. Change-Id: I25d1d90e002fa9eb3c5bc366cc74cb70a2daa69f Closes-bug: #1269982 Signed-off-by: Emilien Macchi --- lib/neutron | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/neutron b/lib/neutron index 43f43f951a..a909b8b81c 100644 --- a/lib/neutron +++ b/lib/neutron @@ -505,8 +505,7 @@ function stop_neutron() { [ ! -z "$pid" ] && sudo kill -9 $pid fi if is_service_enabled q-meta; then - pid=$(ps aux | awk '/neutron-ns-metadata-proxy/ { print $2 }') - [ ! -z "$pid" ] && sudo kill -9 $pid + pkill -9 -f neutron-ns-metadata-proxy fi if is_service_enabled q-lbaas; then