Browse code

Stop neutron services more explicitly

After an unstack.sh several neutron services are left running. This
change tries to do a better (but not always successful) job of
stopping neutron agents.

stop_process does its own checking to see if a service is enabled
so we don't need to check before calling.

Change-Id: I8becbe9db56121cbc619a6d156b18f6c6d31a6e7

Chris Dent authored on 2015/02/04 01:22:44
Showing 3 changed files
... ...
@@ -749,13 +749,21 @@ function start_neutron_agents {
749 749
 # stop_neutron() - Stop running processes (non-screen)
750 750
 function stop_neutron {
751 751
     if is_service_enabled q-dhcp; then
752
+        stop_process q-dhcp
752 753
         pid=$(ps aux | awk '/[d]nsmasq.+interface=(tap|ns-)/ { print $2 }')
753 754
         [ ! -z "$pid" ] && sudo kill -9 $pid
754 755
     fi
756
+
757
+    stop_process q-svc
758
+    stop_process q-l3
759
+
755 760
     if is_service_enabled q-meta; then
756 761
         sudo pkill -9 -f neutron-ns-metadata-proxy || :
762
+        stop_process q-meta
757 763
     fi
758 764
 
765
+    stop_process q-agt
766
+
759 767
     if is_service_enabled q-lbaas; then
760 768
         neutron_lbaas_stop
761 769
     fi
... ...
@@ -23,7 +23,7 @@ function neutron_agent_metering_configure_agent {
23 23
 }
24 24
 
25 25
 function neutron_metering_stop {
26
-    :
26
+    stop_process q-metering
27 27
 }
28 28
 
29 29
 # Restore xtrace
... ...
@@ -28,6 +28,7 @@ function neutron_vpn_stop {
28 28
     if [ -n "$pids" ]; then
29 29
         sudo kill $pids
30 30
     fi
31
+    stop_process q-vpn
31 32
 }
32 33
 
33 34
 # Restore xtrace