Stop n-cpu by correct process name /w fake

When VIRT_DRIVER=fake, n-cpu processes are numbered (ie, n-cpu-1) in
start_nova. However, this scheme is not taken into account when
stopping nova, resulting in leftover n-cpu processes that fail
grenade's stop-base if USE_SCREEN=False. This special cases for the
fake driver in stop_nova_compute and ensures n-cpu(s) is shutdown
correctly.

Change-Id: Icebece9eadc4e10bb12fe4fdd2fa37d5f3983f66
Close-bug: #1378112
This commit is contained in:
Adam Gandelman 2014-10-06 14:33:59 -07:00
parent 690e3c2574
commit d29ca35e79

View File

@ -755,7 +755,14 @@ function start_nova {
}
function stop_nova_compute {
stop_process n-cpu
if [ "$VIRT_DRIVER" == "fake" ]; then
local i
for i in `seq 1 $NUMBER_FAKE_NOVA_COMPUTE`; do
stop_process n-cpu-${i}
done
else
stop_process n-cpu
fi
if is_service_enabled n-cpu && [[ -r $NOVA_PLUGINS/hypervisor-$VIRT_DRIVER ]]; then
stop_nova_hypervisor
fi