From 6db29904df63ae26a0f4a4b2e4e0c2e6f2cef669 Mon Sep 17 00:00:00 2001 From: Chris Behrens Date: Tue, 22 Oct 2013 09:22:36 -0700 Subject: [PATCH] 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 --- lib/nova | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/nova b/lib/nova index 809f8e5896..31f286d943 100644 --- a/lib/nova +++ b/lib/nova @@ -613,21 +613,25 @@ function start_nova_api() { # start_nova_compute() - Start the compute process function start_nova_compute() { - NOVA_CONF_BOTTOM=$NOVA_CONF + if is_service_enabled n-cell; then + local compute_cell_conf=$NOVA_CELLS_CONF + else + local compute_cell_conf=$NOVA_CONF + fi if [[ "$VIRT_DRIVER" = 'libvirt' ]]; then # The group **$LIBVIRT_GROUP** is added to the current user in this script. # Use 'sg' to execute nova-compute as a member of the **$LIBVIRT_GROUP** group. - screen_it n-cpu "cd $NOVA_DIR && sg $LIBVIRT_GROUP '$NOVA_BIN_DIR/nova-compute --config-file $NOVA_CONF_BOTTOM'" + screen_it n-cpu "cd $NOVA_DIR && sg $LIBVIRT_GROUP '$NOVA_BIN_DIR/nova-compute --config-file $compute_cell_conf'" elif [[ "$VIRT_DRIVER" = 'fake' ]]; then for i in `seq 1 $NUMBER_FAKE_NOVA_COMPUTE`; do - screen_it n-cpu "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-compute --config-file $NOVA_CONF_BOTTOM" + screen_it n-cpu "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-compute --config-file $compute_cell_conf" done else if is_service_enabled n-cpu && [[ -r $NOVA_PLUGINS/hypervisor-$VIRT_DRIVER ]]; then start_nova_hypervisor fi - screen_it n-cpu "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-compute --config-file $NOVA_CONF_BOTTOM" + screen_it n-cpu "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-compute --config-file $compute_cell_conf" fi }