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
diff --git a/lib/cinder b/lib/cinder
index cefb609..76314c1 100644
--- a/lib/cinder
+++ b/lib/cinder
@@ -353,7 +353,9 @@
# Format logging
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
configure_cinder_driver