Skip to content

Commit 4330484

Browse files
committed
Set public_endpoint to GLANCE_URL for glance-api
We run glance behind uwsgi. This means that the URL glance knows about itself is wrong, and version discovery fails. Set the public endpoint to the value of GLANCE_URL which should always be correct. Change-Id: Ia7c69024a0ef6cc0fdc284ffcd06eee5678a1007
1 parent 7fef90a commit 4330484

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lib/glance

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,12 @@ function configure_glance {
186186
inicomment $GLANCE_API_CONF glance_store swift_store_auth_address
187187
fi
188188

189+
# We need to tell glance what it's public endpoint is so that the version
190+
# discovery document will be correct
191+
iniset $GLANCE_API_CONF DEFAULT public_endpoint $GLANCE_URL
192+
189193
if is_service_enabled tls-proxy; then
190194
iniset $GLANCE_API_CONF DEFAULT bind_port $GLANCE_SERVICE_PORT_INT
191-
iniset $GLANCE_API_CONF DEFAULT public_endpoint $GLANCE_SERVICE_PROTOCOL://$GLANCE_HOSTPORT
192195
iniset $GLANCE_REGISTRY_CONF DEFAULT bind_port $GLANCE_REGISTRY_PORT_INT
193196

194197
iniset $GLANCE_API_CONF keystone_authtoken identity_uri $KEYSTONE_AUTH_URI

0 commit comments

Comments
 (0)