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
This commit is contained in:
Dan Smith 2013-10-21 13:06:11 -07:00
parent ff38d464e4
commit 2e15946012

@ -610,20 +610,10 @@ function start_nova_api() {
fi
}
# start_nova() - Start running processes, including screen
function start_nova() {
# start_nova_compute() - Start the compute process
function start_nova_compute() {
NOVA_CONF_BOTTOM=$NOVA_CONF
# ``screen_it`` checks ``is_service_enabled``, it is not needed here
screen_it n-cond "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-conductor"
if is_service_enabled n-cell; then
NOVA_CONF_BOTTOM=$NOVA_CELLS_CONF
screen_it n-cond "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-conductor --config-file $NOVA_CELLS_CONF"
screen_it n-cell-region "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-cells --config-file $NOVA_CONF"
screen_it n-cell-child "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-cells --config-file $NOVA_CELLS_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.
@ -639,6 +629,22 @@ function start_nova() {
fi
screen_it n-cpu "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-compute --config-file $NOVA_CONF_BOTTOM"
fi
}
# start_nova() - Start running processes, including screen
function start_nova_rest() {
NOVA_CONF_BOTTOM=$NOVA_CONF
# ``screen_it`` checks ``is_service_enabled``, it is not needed here
screen_it n-cond "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-conductor"
if is_service_enabled n-cell; then
NOVA_CONF_BOTTOM=$NOVA_CELLS_CONF
screen_it n-cond "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-conductor --config-file $NOVA_CELLS_CONF"
screen_it n-cell-region "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-cells --config-file $NOVA_CONF"
screen_it n-cell-child "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-cells --config-file $NOVA_CELLS_CONF"
fi
screen_it n-crt "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-cert"
screen_it n-net "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-network --config-file $NOVA_CONF_BOTTOM"
screen_it n-sch "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-scheduler --config-file $NOVA_CONF_BOTTOM"
@ -655,6 +661,11 @@ function start_nova() {
screen_it n-obj "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-objectstore"
}
function start_nova() {
start_nova_compute
start_nova_rest
}
# stop_nova() - Stop running processes (non-screen)
function stop_nova() {
# Kill the nova screen windows