From 2e159460126febc8be6d65477cc94ef6ef159649 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Mon, 21 Oct 2013 13:06:11 -0700 Subject: [PATCH] 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 --- lib/nova | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/lib/nova b/lib/nova index 5ff5099c6d..09c6a50dd5 100644 --- a/lib/nova +++ b/lib/nova @@ -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