Merge "remove db setting when no nova service need it"
This commit is contained in:
commit
a1913db5d7
10
lib/nova
10
lib/nova
@ -465,8 +465,6 @@ function create_nova_conf {
|
|||||||
else
|
else
|
||||||
iniset $NOVA_CONF DEFAULT my_ip "$HOST_IP"
|
iniset $NOVA_CONF DEFAULT my_ip "$HOST_IP"
|
||||||
fi
|
fi
|
||||||
iniset $NOVA_CONF database connection `database_connection_url nova`
|
|
||||||
iniset $NOVA_CONF api_database connection `database_connection_url nova_api`
|
|
||||||
iniset $NOVA_CONF DEFAULT instance_name_template "${INSTANCE_NAME_PREFIX}%08x"
|
iniset $NOVA_CONF DEFAULT instance_name_template "${INSTANCE_NAME_PREFIX}%08x"
|
||||||
iniset $NOVA_CONF DEFAULT osapi_compute_listen "$NOVA_SERVICE_LISTEN_ADDRESS"
|
iniset $NOVA_CONF DEFAULT osapi_compute_listen "$NOVA_SERVICE_LISTEN_ADDRESS"
|
||||||
iniset $NOVA_CONF DEFAULT metadata_listen "$NOVA_SERVICE_LISTEN_ADDRESS"
|
iniset $NOVA_CONF DEFAULT metadata_listen "$NOVA_SERVICE_LISTEN_ADDRESS"
|
||||||
@ -478,6 +476,14 @@ function create_nova_conf {
|
|||||||
iniset $NOVA_CONF DEFAULT bindir "/usr/bin"
|
iniset $NOVA_CONF DEFAULT bindir "/usr/bin"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# only setup database connections if there are services that
|
||||||
|
# require them running on the host. The ensures that n-cpu doesn't
|
||||||
|
# leak a need to use the db in a multinode scenario.
|
||||||
|
if is_service_enabled n-api n-cond n-sched; then
|
||||||
|
iniset $NOVA_CONF database connection `database_connection_url nova`
|
||||||
|
iniset $NOVA_CONF api_database connection `database_connection_url nova_api`
|
||||||
|
fi
|
||||||
|
|
||||||
if is_service_enabled n-api; then
|
if is_service_enabled n-api; then
|
||||||
if is_service_enabled n-api-meta; then
|
if is_service_enabled n-api-meta; then
|
||||||
# If running n-api-meta as a separate service
|
# If running n-api-meta as a separate service
|
||||||
|
Loading…
Reference in New Issue
Block a user