From d29ca35e79fab38a48399a305074fd72663f998a Mon Sep 17 00:00:00 2001 From: Adam Gandelman Date: Mon, 6 Oct 2014 14:33:59 -0700 Subject: [PATCH] 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 --- lib/nova | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/nova b/lib/nova index 096d380e03..10bf4726ac 100644 --- a/lib/nova +++ b/lib/nova @@ -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