Browse code

Start nova-compute with child cell conf

A recent commit broke the cells support and switched nova-compute to always
start with the API cell .conf. This corrects the regression.

Change-Id: I633344c8784c154f61e751cd0a408196e61525b3
Closes-bug: 1243961

Chris Behrens authored on 2013/10/23 01:22:36
Showing 1 changed files
... ...
@@ -613,21 +613,25 @@ function start_nova_api() {
613 613
 
614 614
 # start_nova_compute() - Start the compute process
615 615
 function start_nova_compute() {
616
-    NOVA_CONF_BOTTOM=$NOVA_CONF
616
+    if is_service_enabled n-cell; then
617
+        local compute_cell_conf=$NOVA_CELLS_CONF
618
+    else
619
+        local compute_cell_conf=$NOVA_CONF
620
+    fi
617 621
 
618 622
     if [[ "$VIRT_DRIVER" = 'libvirt' ]]; then
619 623
         # The group **$LIBVIRT_GROUP** is added to the current user in this script.
620 624
         # Use 'sg' to execute nova-compute as a member of the **$LIBVIRT_GROUP** group.
621
-        screen_it n-cpu "cd $NOVA_DIR && sg $LIBVIRT_GROUP '$NOVA_BIN_DIR/nova-compute --config-file $NOVA_CONF_BOTTOM'"
625
+        screen_it n-cpu "cd $NOVA_DIR && sg $LIBVIRT_GROUP '$NOVA_BIN_DIR/nova-compute --config-file $compute_cell_conf'"
622 626
     elif [[ "$VIRT_DRIVER" = 'fake' ]]; then
623 627
         for i in `seq 1 $NUMBER_FAKE_NOVA_COMPUTE`; do
624
-            screen_it n-cpu "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-compute --config-file $NOVA_CONF_BOTTOM"
628
+            screen_it n-cpu "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-compute --config-file $compute_cell_conf"
625 629
         done
626 630
     else
627 631
         if is_service_enabled n-cpu && [[ -r $NOVA_PLUGINS/hypervisor-$VIRT_DRIVER ]]; then
628 632
             start_nova_hypervisor
629 633
         fi
630
-        screen_it n-cpu "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-compute --config-file $NOVA_CONF_BOTTOM"
634
+        screen_it n-cpu "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-compute --config-file $compute_cell_conf"
631 635
     fi
632 636
 }
633 637