From 43304849cfde41fa86a6fdd334ab6e703598ef8d Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Wed, 21 Jun 2017 21:45:14 +0100 Subject: [PATCH] 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 --- lib/glance | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/glance b/lib/glance index 99941232f3..41145f980d 100644 --- a/lib/glance +++ b/lib/glance @@ -186,9 +186,12 @@ function configure_glance { inicomment $GLANCE_API_CONF glance_store swift_store_auth_address fi + # We need to tell glance what it's public endpoint is so that the version + # discovery document will be correct + iniset $GLANCE_API_CONF DEFAULT public_endpoint $GLANCE_URL + if is_service_enabled tls-proxy; then iniset $GLANCE_API_CONF DEFAULT bind_port $GLANCE_SERVICE_PORT_INT - iniset $GLANCE_API_CONF DEFAULT public_endpoint $GLANCE_SERVICE_PROTOCOL://$GLANCE_HOSTPORT iniset $GLANCE_REGISTRY_CONF DEFAULT bind_port $GLANCE_REGISTRY_PORT_INT iniset $GLANCE_API_CONF keystone_authtoken identity_uri $KEYSTONE_AUTH_URI