Stop Neutron advanced service external processes
Some of Neutron advanced services (LBaaS, VPNaaS, ....) creates
external processes and they should be stopped in unstack.
This commit defines neutron_<XaaS>_stop functions for all services
and implements the cleanup logics if necessary.
Also cleanup_neutron removes netns used by LBaaS haproxy.
Change-Id: Ied3a2c374ffcb6b59ecaf1027fb6e6083eded2ae
diff --git a/lib/neutron_plugins/services/loadbalancer b/lib/neutron_plugins/services/loadbalancer
index c38f904..2699a9b 100644
--- a/lib/neutron_plugins/services/loadbalancer
+++ b/lib/neutron_plugins/services/loadbalancer
@@ -45,5 +45,10 @@
fi
}
+function neutron_lbaas_stop() {
+ pids=$(ps aux | awk '/haproxy/ { print $2 }')
+ [ ! -z "$pids" ] && sudo kill $pids
+}
+
# Restore xtrace
$MY_XTRACE