diff --git a/devstack/lib/magnum b/devstack/lib/magnum index 964e87cae1..1af8755d34 100644 --- a/devstack/lib/magnum +++ b/devstack/lib/magnum @@ -160,7 +160,7 @@ function create_magnum_conf { configure_auth_token_middleware $MAGNUM_CONF magnum $MAGNUM_AUTH_CACHE_DIR iniset $MAGNUM_CONF keystone_auth auth_url $KEYSTONE_AUTH_URI_V3 - iniset $MAGNUM_CONF keystone_authtoken auth_uri $KEYSTONE_SERVICE_URI_V3 + iniset $MAGNUM_CONF keystone_authtoken www_authenticate_uri $KEYSTONE_SERVICE_URI_V3 iniset $MAGNUM_CONF keystone_authtoken auth_url $KEYSTONE_AUTH_URI_V3 iniset $MAGNUM_CONF keystone_authtoken auth_version v3 diff --git a/magnum/common/keystone.py b/magnum/common/keystone.py index 44bf38f827..59ac8be972 100755 --- a/magnum/common/keystone.py +++ b/magnum/common/keystone.py @@ -44,7 +44,12 @@ class KeystoneClientV3(object): def auth_url(self): # FIXME(pauloewerton): auth_url should be retrieved from keystone_auth # section by default - return CONF[ksconf.CFG_LEGACY_GROUP].auth_uri.replace('v2.0', 'v3') + conf = CONF[ksconf.CFG_LEGACY_GROUP] + auth_uri = (getattr(conf, 'www_authenticate_uri', None) or + getattr(conf, 'auth_uri', None)) + if auth_uri: + auth_uri = auth_uri.replace('v2.0', 'v3') + return auth_uri @property def auth_token(self): diff --git a/magnum/tests/contrib/post_test_hook.sh b/magnum/tests/contrib/post_test_hook.sh index 92b88880f2..dd53fe327c 100755 --- a/magnum/tests/contrib/post_test_hook.sh +++ b/magnum/tests/contrib/post_test_hook.sh @@ -68,7 +68,7 @@ function create_test_data { local magnum_api_ip=$(iniget /etc/magnum/magnum.conf api host) local magnum_api_port=$(iniget /etc/magnum/magnum.conf api port) local magnum_url="http://"$magnum_api_ip":"$magnum_api_port"/v1" - local keystone_auth_url=$(iniget /etc/magnum/magnum.conf keystone_authtoken auth_uri) + local keystone_auth_url=$(iniget /etc/magnum/magnum.conf keystone_authtoken www_authenticate_uri) # pass the appropriate variables via a config file CREDS_FILE=$MAGNUM_DIR/functional_creds.conf