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
diff --git a/lib/nova b/lib/nova
index 809f8e5..31f286d 100644
--- a/lib/nova
+++ b/lib/nova
@@ -613,21 +613,25 @@
# 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
}