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/vpn b/lib/neutron_plugins/services/vpn
index b8f5c7d..55d0a76 100644
--- a/lib/neutron_plugins/services/vpn
+++ b/lib/neutron_plugins/services/vpn
@@ -22,5 +22,16 @@
fi
}
+function neutron_vpn_stop() {
+ local ipsec_data_dir=$DATA_DIR/neutron/ipsec
+ local pids
+ if [ -d $ipsec_data_dir ]; then
+ pids=$(find $ipsec_data_dir -name 'pluto.pid' -exec cat {} \;)
+ fi
+ if [ -n "$pids" ]; then
+ sudo kill $pids
+ fi
+}
+
# Restore xtrace
$MY_XTRACE