devstack/lib/neutron_plugins/services/vpn
Chris Dent 36891dc143 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
2015-02-05 12:39:13 +00:00

36 lines
855 B
Plaintext

# Neutron VPN plugin
# ---------------------------
# Save trace setting
VPN_XTRACE=$(set +o | grep xtrace)
set +o xtrace
AGENT_VPN_BINARY="$NEUTRON_BIN_DIR/neutron-vpn-agent"
VPN_PLUGIN=${VPN_PLUGIN:-"neutron_vpnaas.services.vpn.plugin.VPNDriverPlugin"}
IPSEC_PACKAGE=${IPSEC_PACKAGE:-"openswan"}
function neutron_vpn_install_agent_packages {
install_package $IPSEC_PACKAGE
}
function neutron_vpn_configure_common {
_neutron_service_plugin_class_add $VPN_PLUGIN
_neutron_deploy_rootwrap_filters $NEUTRON_VPNAAS_DIR
}
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
stop_process q-vpn
}
# Restore xtrace
$VPN_XTRACE