Browse code

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: I0f1f296b639096f08c7018cd1daebfcd9a054d01
Closes-bug: #1269982
(cherry picked from commit 04f6dc24a7845ee139977fa5b0c5e53aad8e99bd)

Emilien Macchi authored on 2014/01/17 08:03:38
Showing 1 changed files
... ...
@@ -460,8 +460,7 @@ function stop_neutron() {
460 460
         [ ! -z "$pid" ] && sudo kill -9 $pid
461 461
     fi
462 462
     if is_service_enabled q-meta; then
463
-        pid=$(ps aux | awk '/neutron-ns-metadata-proxy/ { print $2 }')
464
-        [ ! -z "$pid" ] && sudo kill -9 $pid
463
+        sudo pkill -9 neutron-ns-metadata-proxy || :
465 464
     fi
466 465
 }
467 466