Browse code

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

Jens Rosenboom authored on 2016/09/14 05:41:41
Showing 1 changed files
... ...
@@ -187,8 +187,6 @@ function configure_glance {
187 187
 
188 188
         iniset $GLANCE_SWIFT_STORE_CONF ref1 key $SERVICE_PASSWORD
189 189
         iniset $GLANCE_SWIFT_STORE_CONF ref1 auth_address $KEYSTONE_SERVICE_URI/v3
190
-        iniset $GLANCE_SWIFT_STORE_CONF ref1 user_domain_name $SERVICE_DOMAIN_NAME
191
-        iniset $GLANCE_SWIFT_STORE_CONF ref1 project_domain_name $SERVICE_DOMAIN_NAME
192 190
         iniset $GLANCE_SWIFT_STORE_CONF ref1 auth_version 3
193 191
 
194 192
         # commenting is not strictly necessary but it's confusing to have bad values in conf
... ...
@@ -312,6 +310,11 @@ function create_glance_accounts {
312 312
             "$GLANCE_SERVICE_PROTOCOL://$GLANCE_HOSTPORT" \
313 313
             "$GLANCE_SERVICE_PROTOCOL://$GLANCE_HOSTPORT" \
314 314
             "$GLANCE_SERVICE_PROTOCOL://$GLANCE_HOSTPORT"
315
+
316
+        # Note(frickler): Crude workaround for https://bugs.launchpad.net/glance-store/+bug/1620999
317
+        service_domain_id=$(get_or_create_domain $SERVICE_DOMAIN_NAME)
318
+        iniset $GLANCE_SWIFT_STORE_CONF ref1 project_domain_id $service_domain_id
319
+        iniset $GLANCE_SWIFT_STORE_CONF ref1 user_domain_id $service_domain_id
315 320
     fi
316 321
 
317 322
     # Add glance-glare service and endpoints