From 8535d8b3fc283ac4ebb7a851b19bf2bff36d78d0 Mon Sep 17 00:00:00 2001 From: Yong Sheng Gong Date: Sun, 25 Aug 2013 11:21:13 +0800 Subject: [PATCH] use keystone service port instead of admin port Change-Id: Iaf1848ecabf100171f741fde0efee5d8f65b7795 Fixes: Bug #1214921 --- lib/neutron | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/neutron b/lib/neutron index 31876dee88..1084e65785 100644 --- a/lib/neutron +++ b/lib/neutron @@ -577,7 +577,7 @@ function _configure_neutron_metadata_agent() { 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 True True + _neutron_setup_keystone $Q_META_CONF_FILE DEFAULT True True True } @@ -690,11 +690,16 @@ function _neutron_setup_keystone() { local section=$2 local use_auth_url=$3 local skip_auth_cache=$4 + local use_service_port=$5 + local keystone_port=$KEYSTONE_AUTH_PORT + if [[ -n $use_service_port ]]; then + keystone_port=$KEYSTONE_SERVICE_PORT + fi if [[ -n $use_auth_url ]]; then - iniset $conf_file $section auth_url "$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_AUTH_HOST:$KEYSTONE_AUTH_PORT/v2.0" + iniset $conf_file $section auth_url "$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_AUTH_HOST:$keystone_port/v2.0" else iniset $conf_file $section auth_host $KEYSTONE_SERVICE_HOST - iniset $conf_file $section auth_port $KEYSTONE_AUTH_PORT + iniset $conf_file $section auth_port $keystone_port iniset $conf_file $section auth_protocol $KEYSTONE_SERVICE_PROTOCOL fi iniset $conf_file $section admin_tenant_name $SERVICE_TENANT_NAME