Always use the right Cinder endpoint

Default Devstack behavior now is running Cinder under uwsgi, so reflect
that when appropriate. Unfortunately, unlike Glance and other services,
there is not a single environment variable which reflects the proper
form of the endpoint so we need to construct it ourselves.

Change-Id: I953f5086b57a2564b838bc1cfbecba3897961157
This commit is contained in:
Jeremy Freudberg 2017-07-31 14:22:25 +00:00
parent 4130ec8ca6
commit 4e18ef34c9
1 changed files with 9 additions and 2 deletions

View File

@ -38,8 +38,15 @@ function configure_mixmatch {
iniset $MIXMATCH_CONF sp_default sp_name default
iniset $MIXMATCH_CONF sp_default auth_url "$KEYSTONE_AUTH_URI/v3"
iniset $MIXMATCH_CONF sp_default image_endpoint $GLANCE_URL
iniset $MIXMATCH_CONF sp_default volume_endpoint \
"$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT"
CINDER_BASE="$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST"
if [ "$CINDER_USE_MOD_WSGI" == "True" ]; then
CINDER_URL="$CINDER_BASE/volume"
else
CINDER_URL="$CINDER_BASE:$CINDER_SERVICE_PORT"
fi
iniset $MIXMATCH_CONF sp_default volume_endpoint $CINDER_URL
run_process mixmatch "$MIXMATCH_DIR/run_proxy.sh"