Specify nova configuration file with --config-dir
This change use '--config-dir' option to indicate specific configuration folder to store configuration files for setting nova services. That allows, for exmaple, to define the same setting with different value for two different nova services. Change-Id: I77c382f05128112102959e1370736fc8564bcb1f Closes-bug: #1326016
This commit is contained in:
parent
5f8e75a84e
commit
5f5428dcb1
@ -4,9 +4,9 @@ set -eux
|
||||
TEMPLATE_ROOT=$(dirname $0)/../os-apply-config
|
||||
|
||||
get_additional_config(){
|
||||
if [ -e ${TEMPLATE_ROOT}/etc/nova/nova-${1}.conf ]; then
|
||||
echo "--config-file /etc/nova/nova.conf --config-file /etc/nova/nova-${1}.conf"
|
||||
fi
|
||||
if [ -d ${TEMPLATE_ROOT}/etc/nova/${1} ]; then
|
||||
echo "--config-dir /etc/nova/${1}"
|
||||
fi
|
||||
}
|
||||
|
||||
NOVA_COMPONENTS="api cert scheduler consoleauth conductor"
|
||||
|
@ -9,8 +9,8 @@ install-packages bridge-utils ebtables qemu-utils syslinux
|
||||
CONFIG_PARAMETERS="--config-dir /etc/nova"
|
||||
TEMPLATE_ROOT=$(dirname $0)/../os-apply-config
|
||||
|
||||
if [ -e ${TEMPLATE_ROOT}/etc/nova/nova-compute.conf ]; then
|
||||
CONFIG_PARAMETERS="${CONFIG_PARAMETERS} --config-file /etc/nova/nova.conf --config-file /etc/nova/nova-compute.conf"
|
||||
if [ -d ${TEMPLATE_ROOT}/etc/nova/compute ]; then
|
||||
CONFIG_PARAMETERS="${CONFIG_PARAMETERS} --config-dir /etc/nova/compute"
|
||||
fi
|
||||
|
||||
os-svc-daemon -i "$NOVA_VENV_DIR" -e "LIBVIRT_DEFAULT_URI=qemu:///system" nova-compute nova nova-compute "${CONFIG_PARAMETERS}"
|
||||
|
Loading…
Reference in New Issue
Block a user