Merge "Add IPv6 support to openrc files"

This commit is contained in:
Jenkins 2015-07-08 12:49:41 +00:00 committed by Gerrit Code Review
commit 71828f756f
2 changed files with 17 additions and 9 deletions

View File

@ -47,7 +47,7 @@ TRACK_DEPENDS=${TRACK_DEPENDS:-False}
STACK_ENV_VARS="BASE_SQL_CONN DATA_DIR DEST ENABLED_SERVICES HOST_IP \ STACK_ENV_VARS="BASE_SQL_CONN DATA_DIR DEST ENABLED_SERVICES HOST_IP \
KEYSTONE_AUTH_PROTOCOL KEYSTONE_AUTH_URI KEYSTONE_SERVICE_URI \ KEYSTONE_AUTH_PROTOCOL KEYSTONE_AUTH_URI KEYSTONE_SERVICE_URI \
LOGFILE OS_CACERT SERVICE_HOST SERVICE_PROTOCOL STACK_USER TLS_IP \ LOGFILE OS_CACERT SERVICE_HOST SERVICE_PROTOCOL STACK_USER TLS_IP \
HOST_IPV6" HOST_IPV6 SERVICE_IP_VERSION"
# Saves significant environment variables to .stackenv for later use # Saves significant environment variables to .stackenv for later use

24
openrc
View File

@ -56,18 +56,26 @@ export OS_NO_CACHE=${OS_NO_CACHE:-1}
# Region # Region
export OS_REGION_NAME=${REGION_NAME:-RegionOne} export OS_REGION_NAME=${REGION_NAME:-RegionOne}
# Set api HOST_IP endpoint. SERVICE_HOST may also be used to specify the endpoint, # Set the host API endpoint. This will default to HOST_IP if SERVICE_IP_VERSION
# which is convenient for some localrc configurations. # is 4, else HOST_IPV6 if it's 6. SERVICE_HOST may also be used to specify the
HOST_IP=${HOST_IP:-127.0.0.1} # endpoint, which is convenient for some localrc configurations. Additionally,
SERVICE_HOST=${SERVICE_HOST:-$HOST_IP} # some exercises call Glance directly. On a single-node installation, Glance
# should be listening on a local IP address, depending on the setting of
# SERVICE_IP_VERSION. If its running elsewhere, it can be set here.
if [[ $SERVICE_IP_VERSION == 6 ]]; then
HOST_IPV6=${HOST_IPV6:-::1}
SERVICE_HOST=${SERVICE_HOST:-[$HOST_IPV6]}
GLANCE_HOST=${GLANCE_HOST:-[$HOST_IPV6]}
else
HOST_IP=${HOST_IP:-127.0.0.1}
SERVICE_HOST=${SERVICE_HOST:-$HOST_IP}
GLANCE_HOST=${GLANCE_HOST:-$HOST_IP}
fi
SERVICE_PROTOCOL=${SERVICE_PROTOCOL:-http} SERVICE_PROTOCOL=${SERVICE_PROTOCOL:-http}
KEYSTONE_AUTH_PROTOCOL=${KEYSTONE_AUTH_PROTOCOL:-$SERVICE_PROTOCOL} KEYSTONE_AUTH_PROTOCOL=${KEYSTONE_AUTH_PROTOCOL:-$SERVICE_PROTOCOL}
KEYSTONE_AUTH_HOST=${KEYSTONE_AUTH_HOST:-$SERVICE_HOST} KEYSTONE_AUTH_HOST=${KEYSTONE_AUTH_HOST:-$SERVICE_HOST}
# Some exercises call glance directly. On a single-node installation, Glance
# should be listening on HOST_IP. If its running elsewhere, it can be set here
GLANCE_HOST=${GLANCE_HOST:-$HOST_IP}
# Identity API version # Identity API version
export OS_IDENTITY_API_VERSION=${IDENTITY_API_VERSION:-2.0} export OS_IDENTITY_API_VERSION=${IDENTITY_API_VERSION:-2.0}