From 890342ed878f4a8f556ae733b6bd6c872308a937 Mon Sep 17 00:00:00 2001 From: Jens Rosenboom Date: Tue, 13 Sep 2016 22:41:41 +0200 Subject: [PATCH] Work around issue in glance_store swift driver With [1] glance_store introduced default settings for user_domain_id and project_domain_id. Sadly since these are always passed to the keystone client, they override any settings to user_domain_name and project_domain_name that are made in the config, leading to authentication failures. So as a workaround until [2] is fixed, we explicitly place the corresponding domain_ids into the config. [1] https://review.openstack.org/297665 [2] https://bugs.launchpad.net/tempest/+bug/1620999 Change-Id: Ica81a1a176614392291f2db4cc6398ed30663aed --- lib/glance | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/glance b/lib/glance index 8d95aad73f..5274714a6c 100644 --- a/lib/glance +++ b/lib/glance @@ -187,8 +187,6 @@ function configure_glance { iniset $GLANCE_SWIFT_STORE_CONF ref1 key $SERVICE_PASSWORD iniset $GLANCE_SWIFT_STORE_CONF ref1 auth_address $KEYSTONE_SERVICE_URI/v3 - iniset $GLANCE_SWIFT_STORE_CONF ref1 user_domain_name $SERVICE_DOMAIN_NAME - iniset $GLANCE_SWIFT_STORE_CONF ref1 project_domain_name $SERVICE_DOMAIN_NAME iniset $GLANCE_SWIFT_STORE_CONF ref1 auth_version 3 # commenting is not strictly necessary but it's confusing to have bad values in conf @@ -312,6 +310,11 @@ function create_glance_accounts { "$GLANCE_SERVICE_PROTOCOL://$GLANCE_HOSTPORT" \ "$GLANCE_SERVICE_PROTOCOL://$GLANCE_HOSTPORT" \ "$GLANCE_SERVICE_PROTOCOL://$GLANCE_HOSTPORT" + + # Note(frickler): Crude workaround for https://bugs.launchpad.net/glance-store/+bug/1620999 + service_domain_id=$(get_or_create_domain $SERVICE_DOMAIN_NAME) + iniset $GLANCE_SWIFT_STORE_CONF ref1 project_domain_id $service_domain_id + iniset $GLANCE_SWIFT_STORE_CONF ref1 user_domain_id $service_domain_id fi # Add glance-glare service and endpoints