Browse code

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

Adam Gandelman authored on 2014/10/07 06:33:59
Showing 1 changed files
... ...
@@ -755,7 +755,14 @@ function start_nova {
755 755
 }
756 756
 
757 757
 function stop_nova_compute {
758
-    stop_process n-cpu
758
+    if [ "$VIRT_DRIVER" == "fake" ]; then
759
+        local i
760
+        for i in `seq 1 $NUMBER_FAKE_NOVA_COMPUTE`; do
761
+            stop_process n-cpu-${i}
762
+        done
763
+    else
764
+        stop_process n-cpu
765
+    fi
759 766
     if is_service_enabled n-cpu && [[ -r $NOVA_PLUGINS/hypervisor-$VIRT_DRIVER ]]; then
760 767
         stop_nova_hypervisor
761 768
     fi