Browse code

Disable all import methods if glance is not standalone

Glance should not be exposing import methods that cannot work via its
API, but it does today. In order for tempest (et al) to be able to
properly detect whether import is possible, we must configure the
import methods in standalone mode, or disable them in wsgi mode. The
referenced Glance patch will make this a requirement.

Change-Id: I3bf3498d83607c5e98b70877c061dc54fc3c0a6e
Needed-By: https://review.opendev.org/#/c/741497/

Dan Smith authored on 2020/07/17 02:41:13
Showing 1 changed files
... ...
@@ -183,6 +183,11 @@ function configure_glance {
183 183
         iniset $GLANCE_API_CONF cors allowed_origin "http://$SERVICE_HOST"
184 184
     fi
185 185
 
186
+    if [[ "$GLANCE_STANDALONE" == "False" ]]; then
187
+        # NOTE(danms): Do not advertise import methods if we are running in WSGI mode
188
+        iniset $GLANCE_API_CONF enabled_import_methods []
189
+    fi
190
+
186 191
     # No multiple stores for swift yet
187 192
     # Store the images in swift if enabled.
188 193
     if is_service_enabled s-proxy; then