Merge "Stop Neutron advanced service external processes"

This commit is contained in:
Jenkins 2013-12-18 00:04:07 +00:00 committed by Gerrit Code Review
commit fedaf6f246
5 changed files with 38 additions and 1 deletions

View File

@ -508,6 +508,19 @@ function stop_neutron() {
pid=$(ps aux | awk '/neutron-ns-metadata-proxy/ { print $2 }')
[ ! -z "$pid" ] && sudo kill -9 $pid
fi
if is_service_enabled q-lbaas; then
neutron_lbaas_stop
fi
if is_service_enabled q-fwaas; then
neutron_fwaas_stop
fi
if is_service_enabled q-vpn; then
neutron_vpn_stop
fi
if is_service_enabled q-metering; then
neutron_metering_stop
fi
}
# cleanup_neutron() - Remove residual data files, anything left over from previous
@ -518,7 +531,7 @@ function cleanup_neutron() {
fi
# delete all namespaces created by neutron
for ns in $(sudo ip netns list | grep -o -e qdhcp-[0-9a-f\-]* -e qrouter-[0-9a-f\-]*); do
for ns in $(sudo ip netns list | grep -o -E '(qdhcp|qrouter|qlbaas)-[0-9a-f-]*'); do
sudo ip netns delete ${ns}
done
}

View File

@ -23,5 +23,9 @@ function neutron_fwaas_configure_driver() {
iniset_multiline $FWAAS_DRIVER_CONF_FILENAME fwaas driver "neutron.services.firewall.drivers.linux.iptables_fwaas.IptablesFwaasDriver"
}
function neutron_fwaas_stop() {
:
}
# Restore xtrace
$MY_XTRACE

View File

@ -45,5 +45,10 @@ function neutron_agent_lbaas_configure_agent() {
fi
}
function neutron_lbaas_stop() {
pids=$(ps aux | awk '/haproxy/ { print $2 }')
[ ! -z "$pids" ] && sudo kill $pids
}
# Restore xtrace
$MY_XTRACE

View File

@ -26,5 +26,9 @@ function neutron_agent_metering_configure_agent() {
cp $NEUTRON_DIR/etc/metering_agent.ini $METERING_AGENT_CONF_FILENAME
}
function neutron_metering_stop() {
:
}
# Restore xtrace
$MY_XTRACE

View File

@ -22,5 +22,16 @@ function neutron_vpn_configure_common() {
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