From 80f3635521c23235b75c6a9cbb8e8edcaf667ae6 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Mon, 2 Jan 2017 09:30:16 -0500 Subject: [PATCH] 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 --- lib/glance | 11 ++++++++++- lib/swift | 1 - 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/glance b/lib/glance index da9cd43536..4ba1d20bd7 100644 --- a/lib/glance +++ b/lib/glance @@ -161,6 +161,9 @@ function configure_glance { if is_service_enabled s-proxy; then iniset $GLANCE_API_CONF glance_store default_store swift iniset $GLANCE_API_CONF glance_store swift_store_create_container_on_put True + if python3_enabled; then + iniset $GLANCE_API_CONF glance_store swift_store_auth_insecure True + fi iniset $GLANCE_API_CONF glance_store swift_store_config_file $GLANCE_SWIFT_STORE_CONF iniset $GLANCE_API_CONF glance_store default_swift_reference ref1 @@ -186,7 +189,13 @@ function configure_glance { fi iniset $GLANCE_SWIFT_STORE_CONF ref1 key $SERVICE_PASSWORD - iniset $GLANCE_SWIFT_STORE_CONF ref1 auth_address $KEYSTONE_SERVICE_URI/v3 + if python3_enabled; then + # NOTE(dims): Currently the glance_store+swift does not support either an insecure flag + # or ability to specify the CACERT. So fallback to http:// url + iniset $GLANCE_SWIFT_STORE_CONF ref1 auth_address ${KEYSTONE_SERVICE_URI/https/http}/v3 + else + iniset $GLANCE_SWIFT_STORE_CONF ref1 auth_address $KEYSTONE_SERVICE_URI/v3 + fi iniset $GLANCE_SWIFT_STORE_CONF ref1 auth_version 3 # commenting is not strictly necessary but it's confusing to have bad values in conf diff --git a/lib/swift b/lib/swift index b175f2e5c1..aafe09d310 100644 --- a/lib/swift +++ b/lib/swift @@ -454,7 +454,6 @@ function configure_swift { # out. Make sure we uncomment Tempauth after we uncomment Keystoneauth # otherwise, this code also sets the reseller_prefix for Keystoneauth. iniuncomment ${SWIFT_CONFIG_PROXY_SERVER} filter:tempauth account_autocreate - iniuncomment ${SWIFT_CONFIG_PROXY_SERVER} filter:tempauth reseller_prefix iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:tempauth reseller_prefix "TEMPAUTH" if is_service_enabled swift3; then