Browse code

Allow starting nova-compute manually

This breaks out the code that starts nova-compute into a separate
function. This will be used for upgrade testing so that we can
arrange for a nova-compute running on a different version of the
code to be running alongside the rest of the stack.

Change-Id: I88687cefdac7fa4a3c45789461a95fd8d061aba6

Dan Smith authored on 2013/10/22 05:06:11
Showing 1 changed files
... ...
@@ -610,20 +610,10 @@ function start_nova_api() {
610 610
     fi
611 611
 }
612 612
 
613
-# start_nova() - Start running processes, including screen
614
-function start_nova() {
613
+# start_nova_compute() - Start the compute process
614
+function start_nova_compute() {
615 615
     NOVA_CONF_BOTTOM=$NOVA_CONF
616 616
 
617
-    # ``screen_it`` checks ``is_service_enabled``, it is not needed here
618
-    screen_it n-cond "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-conductor"
619
-
620
-    if is_service_enabled n-cell; then
621
-        NOVA_CONF_BOTTOM=$NOVA_CELLS_CONF
622
-        screen_it n-cond "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-conductor --config-file $NOVA_CELLS_CONF"
623
-        screen_it n-cell-region "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-cells --config-file $NOVA_CONF"
624
-        screen_it n-cell-child "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-cells --config-file $NOVA_CELLS_CONF"
625
-    fi
626
-
627 617
     if [[ "$VIRT_DRIVER" = 'libvirt' ]]; then
628 618
         # The group **$LIBVIRT_GROUP** is added to the current user in this script.
629 619
         # Use 'sg' to execute nova-compute as a member of the **$LIBVIRT_GROUP** group.
... ...
@@ -639,6 +629,22 @@ function start_nova() {
639 639
         fi
640 640
         screen_it n-cpu "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-compute --config-file $NOVA_CONF_BOTTOM"
641 641
     fi
642
+}
643
+
644
+# start_nova() - Start running processes, including screen
645
+function start_nova_rest() {
646
+    NOVA_CONF_BOTTOM=$NOVA_CONF
647
+
648
+    # ``screen_it`` checks ``is_service_enabled``, it is not needed here
649
+    screen_it n-cond "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-conductor"
650
+
651
+    if is_service_enabled n-cell; then
652
+        NOVA_CONF_BOTTOM=$NOVA_CELLS_CONF
653
+        screen_it n-cond "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-conductor --config-file $NOVA_CELLS_CONF"
654
+        screen_it n-cell-region "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-cells --config-file $NOVA_CONF"
655
+        screen_it n-cell-child "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-cells --config-file $NOVA_CELLS_CONF"
656
+    fi
657
+
642 658
     screen_it n-crt "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-cert"
643 659
     screen_it n-net "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-network --config-file $NOVA_CONF_BOTTOM"
644 660
     screen_it n-sch "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-scheduler --config-file $NOVA_CONF_BOTTOM"
... ...
@@ -655,6 +661,11 @@ function start_nova() {
655 655
         screen_it n-obj "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-objectstore"
656 656
 }
657 657
 
658
+function start_nova() {
659
+    start_nova_compute
660
+    start_nova_rest
661
+}
662
+
658 663
 # stop_nova() - Stop running processes (non-screen)
659 664
 function stop_nova() {
660 665
     # Kill the nova screen windows