From 2468ceaa724aa5c8c44fb87ae223eb6687ff85f2 Mon Sep 17 00:00:00 2001 From: Eric Fried Date: Thu, 25 Jul 2019 13:18:58 -0500 Subject: [PATCH] Merge (don't overwrite) $NOVA_CPU_CONF Per the referenced bug, $NOVA_CPU_CONF was previously being initialized by copying $NOVA_CONF, thereby trashing any values already configured in $NOVA_CPU_CONF. With this commit, we merge the values from $NOVA_CPU_CONF in after the copy. Note that this makes use of the merge_config_file function, which is defined in inc/meta-config, which wasn't being sourced from every code path that hit start_nova_compute; so this commit also moves that import from stack.sh to functions (next to the other imports from inc/, which makes sense anyway). Change-Id: Id3e2baa2221e13f512f8dcf1248e1e15b6a7597f Closes-Bug: #1802143 --- functions | 1 + lib/nova | 3 +++ stack.sh | 3 --- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/functions b/functions index 93035673b5..f33fd25fee 100644 --- a/functions +++ b/functions @@ -18,6 +18,7 @@ declare -r -g _DEVSTACK_FUNCTIONS=1 FUNC_DIR=$(cd $(dirname "${BASH_SOURCE:-$0}") && pwd) source ${FUNC_DIR}/functions-common source ${FUNC_DIR}/inc/ini-config +source ${FUNC_DIR}/inc/meta-config source ${FUNC_DIR}/inc/python source ${FUNC_DIR}/inc/rootwrap diff --git a/lib/nova b/lib/nova index f423b570cd..1ec1a785e6 100644 --- a/lib/nova +++ b/lib/nova @@ -838,7 +838,10 @@ function start_nova_compute { local compute_cell_conf=$NOVA_CONF + # Bug #1802143: $NOVA_CPU_CONF is constructed by first copying $NOVA_CONF... cp $compute_cell_conf $NOVA_CPU_CONF + # ...and then adding/overriding anything explicitly set in $NOVA_CPU_CONF + merge_config_file $TOP_DIR/local.conf post-config '$NOVA_CPU_CONF' if [[ "${CELLSV2_SETUP}" == "singleconductor" ]]; then # NOTE(danms): Grenade doesn't setup multi-cell rabbit, so diff --git a/stack.sh b/stack.sh index b8d597e11c..01469688eb 100755 --- a/stack.sh +++ b/stack.sh @@ -167,9 +167,6 @@ LAST_SPINNER_PID="" # Import common functions source $TOP_DIR/functions -# Import config functions -source $TOP_DIR/inc/meta-config - # Import 'public' stack.sh functions source $TOP_DIR/lib/stack