From 442c57e16855863346806bd6b21e82515158b9e8 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Thu, 16 Jul 2020 10:41:13 -0700 Subject: [PATCH] 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/ --- lib/glance | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/glance b/lib/glance index e941168d32..0f7cd61d72 100644 --- a/lib/glance +++ b/lib/glance @@ -183,6 +183,11 @@ function configure_glance { iniset $GLANCE_API_CONF cors allowed_origin "http://$SERVICE_HOST" fi + if [[ "$GLANCE_STANDALONE" == "False" ]]; then + # NOTE(danms): Do not advertise import methods if we are running in WSGI mode + iniset $GLANCE_API_CONF enabled_import_methods [] + fi + # No multiple stores for swift yet # Store the images in swift if enabled. if is_service_enabled s-proxy; then