Browse code

Run Swift services under py35

* iniuncomment followed by iniset for reseller_prefix just adds a
duplicate line in the config file that configparser does not like
so just remove the uncomment
* fall back to http:// url for glance->swift keystone authentication
* insecure flag to talk to swift

Depends-On: I51d56d16a5b175bd45dee09edc0b2748d72a5d06
Change-Id: I02ed01e20f8dce195c51273e8384130af53384ce

Davanum Srinivas authored on 2017/01/02 23:30:16
Showing 2 changed files
... ...
@@ -161,6 +161,9 @@ function configure_glance {
161 161
     if is_service_enabled s-proxy; then
162 162
         iniset $GLANCE_API_CONF glance_store default_store swift
163 163
         iniset $GLANCE_API_CONF glance_store swift_store_create_container_on_put True
164
+        if python3_enabled; then
165
+            iniset $GLANCE_API_CONF glance_store swift_store_auth_insecure True
166
+        fi
164 167
 
165 168
         iniset $GLANCE_API_CONF glance_store swift_store_config_file $GLANCE_SWIFT_STORE_CONF
166 169
         iniset $GLANCE_API_CONF glance_store default_swift_reference ref1
... ...
@@ -186,7 +189,13 @@ function configure_glance {
186 186
         fi
187 187
 
188 188
         iniset $GLANCE_SWIFT_STORE_CONF ref1 key $SERVICE_PASSWORD
189
-        iniset $GLANCE_SWIFT_STORE_CONF ref1 auth_address $KEYSTONE_SERVICE_URI/v3
189
+        if python3_enabled; then
190
+            # NOTE(dims): Currently the glance_store+swift does not support either an insecure flag
191
+            # or ability to specify the CACERT. So fallback to http:// url
192
+            iniset $GLANCE_SWIFT_STORE_CONF ref1 auth_address ${KEYSTONE_SERVICE_URI/https/http}/v3
193
+        else
194
+            iniset $GLANCE_SWIFT_STORE_CONF ref1 auth_address $KEYSTONE_SERVICE_URI/v3
195
+        fi
190 196
         iniset $GLANCE_SWIFT_STORE_CONF ref1 auth_version 3
191 197
 
192 198
         # commenting is not strictly necessary but it's confusing to have bad values in conf
... ...
@@ -454,7 +454,6 @@ function configure_swift {
454 454
     # out. Make sure we uncomment Tempauth after we uncomment Keystoneauth
455 455
     # otherwise, this code also sets the reseller_prefix for Keystoneauth.
456 456
     iniuncomment ${SWIFT_CONFIG_PROXY_SERVER} filter:tempauth account_autocreate
457
-    iniuncomment ${SWIFT_CONFIG_PROXY_SERVER} filter:tempauth reseller_prefix
458 457
     iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:tempauth reseller_prefix "TEMPAUTH"
459 458
 
460 459
     if is_service_enabled swift3; then