Only write out uwsgi configs when deploying API services
Previously this would always happen for Nova and Cinder even if n-api and c-api were not enabled on the host respectively. This change stops this by placing both calls write_uwsgi_config behind is_service_enabled checks. Change-Id: I997685da771736dbad79bcfe4b00dbc63bd6d6b6
This commit is contained in:
@@ -353,7 +353,9 @@ function configure_cinder {
|
|||||||
# Format logging
|
# Format logging
|
||||||
setup_logging $CINDER_CONF $CINDER_USE_MOD_WSGI
|
setup_logging $CINDER_CONF $CINDER_USE_MOD_WSGI
|
||||||
|
|
||||||
write_uwsgi_config "$CINDER_UWSGI_CONF" "$CINDER_UWSGI" "/volume"
|
if is_service_enabled c-api; then
|
||||||
|
write_uwsgi_config "$CINDER_UWSGI_CONF" "$CINDER_UWSGI" "/volume"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -r $CINDER_PLUGINS/$CINDER_DRIVER ]]; then
|
if [[ -r $CINDER_PLUGINS/$CINDER_DRIVER ]]; then
|
||||||
configure_cinder_driver
|
configure_cinder_driver
|
||||||
|
|||||||
9
lib/nova
9
lib/nova
@@ -488,8 +488,13 @@ function create_nova_conf {
|
|||||||
|
|
||||||
iniset $NOVA_CONF upgrade_levels compute "auto"
|
iniset $NOVA_CONF upgrade_levels compute "auto"
|
||||||
|
|
||||||
write_uwsgi_config "$NOVA_UWSGI_CONF" "$NOVA_UWSGI" "/compute"
|
if is_service_enabled n-api; then
|
||||||
write_uwsgi_config "$NOVA_METADATA_UWSGI_CONF" "$NOVA_METADATA_UWSGI" "" "$SERVICE_LISTEN_ADDRESS:${METADATA_SERVICE_PORT}"
|
write_uwsgi_config "$NOVA_UWSGI_CONF" "$NOVA_UWSGI" "/compute"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if is_service_enabled n-api-meta; then
|
||||||
|
write_uwsgi_config "$NOVA_METADATA_UWSGI_CONF" "$NOVA_METADATA_UWSGI" "" "$SERVICE_LISTEN_ADDRESS:${METADATA_SERVICE_PORT}"
|
||||||
|
fi
|
||||||
|
|
||||||
if is_service_enabled ceilometer; then
|
if is_service_enabled ceilometer; then
|
||||||
iniset $NOVA_CONF DEFAULT instance_usage_audit "True"
|
iniset $NOVA_CONF DEFAULT instance_usage_audit "True"
|
||||||
|
|||||||
Reference in New Issue
Block a user