Fix configure to metadata_agent.ini
Devstack set auth_uri to metadata_agent.ini in _neutron_setup_keystone function.
But Metadata_agent use auth_url not auth_uri.
This is regression caused by https://review.openstack.org/#/c/122882/
Change-Id: Iac8f240558abcdc5bcee3d3c87cef5ad3bb007e8
Closes-bug: #1373859
diff --git a/lib/neutron b/lib/neutron
old mode 100644
new mode 100755
index 0134cbd..6c9d7b9
--- a/lib/neutron
+++ b/lib/neutron
@@ -921,7 +921,9 @@
iniset $Q_META_CONF_FILE DEFAULT nova_metadata_ip $Q_META_DATA_IP
iniset $Q_META_CONF_FILE DEFAULT root_helper "$Q_RR_COMMAND"
- _neutron_setup_keystone $Q_META_CONF_FILE DEFAULT
+ # Configures keystone for metadata_agent
+ # The third argument "True" sets auth_url needed to communicate with keystone
+ _neutron_setup_keystone $Q_META_CONF_FILE DEFAULT True
}
@@ -1066,6 +1068,13 @@
function _neutron_setup_keystone {
local conf_file=$1
local section=$2
+ local use_auth_url=$3
+
+ # Configures keystone for metadata_agent
+ # metadata_agent needs auth_url to communicate with keystone
+ if [[ "$use_auth_url" == "True" ]]; then
+ iniset $conf_file $section auth_url $KEYSTONE_SERVICE_URI/v2.0
+ fi
create_neutron_cache_dir
configure_auth_token_middleware $conf_file $Q_ADMIN_USERNAME $NEUTRON_AUTH_CACHE_DIR $section