Merge "Fix is_keystone_enabled()"
This commit is contained in:
commit
4a9b154f5e
@ -1817,7 +1817,6 @@ function is_service_enabled {
|
||||
[[ ${service} == "trove" && ${ENABLED_SERVICES} =~ "tr-" ]] && enabled=0
|
||||
[[ ${service} == "swift" && ${ENABLED_SERVICES} =~ "s-" ]] && enabled=0
|
||||
[[ ${service} == s-* && ${ENABLED_SERVICES} =~ "swift" ]] && enabled=0
|
||||
[[ ${service} == key-* && ${ENABLED_SERVICES} =~ "key" ]] && enabled=0
|
||||
done
|
||||
$xtrace
|
||||
return $enabled
|
||||
|
12
lib/keystone
12
lib/keystone
@ -111,8 +111,17 @@ KEYSTONE_SERVICE_URI=${KEYSTONE_SERVICE_PROTOCOL}://${KEYSTONE_SERVICE_HOST}:${K
|
||||
KEYSTONE_AUTH_URI_V3=$KEYSTONE_AUTH_URI/v3
|
||||
KEYSTONE_SERVICE_URI_V3=$KEYSTONE_SERVICE_URI/v3
|
||||
|
||||
|
||||
# Functions
|
||||
# ---------
|
||||
|
||||
# Test if Keystone is enabled
|
||||
# is_keystone_enabled
|
||||
function is_keystone_enabled {
|
||||
[[ ,${ENABLED_SERVICES}, =~ ,"key", ]] && return 0
|
||||
return 1
|
||||
}
|
||||
|
||||
# cleanup_keystone() - Remove residual data files, anything left over from previous
|
||||
# runs that a clean run would need to clean up
|
||||
function cleanup_keystone {
|
||||
@ -576,9 +585,6 @@ function stop_keystone {
|
||||
stop_process key
|
||||
}
|
||||
|
||||
function is_keystone_enabled {
|
||||
return is_service_enabled key
|
||||
}
|
||||
|
||||
# Restore xtrace
|
||||
$XTRACE
|
||||
|
@ -393,7 +393,7 @@ function configure_swift {
|
||||
swift_pipeline+=" swift3 s3token "
|
||||
fi
|
||||
|
||||
if is_service_enabled key;then
|
||||
if is_service_enabled keystone; then
|
||||
swift_pipeline+=" authtoken keystoneauth"
|
||||
fi
|
||||
swift_pipeline+=" tempauth "
|
||||
@ -498,7 +498,7 @@ EOF
|
||||
iniset ${testfile} func_test password4 testing4
|
||||
iniset ${testfile} func_test domain4 swift_test
|
||||
|
||||
if is_service_enabled key;then
|
||||
if is_service_enabled keystone; then
|
||||
iniuncomment ${testfile} func_test auth_version
|
||||
local auth_vers=$(iniget ${testfile} func_test auth_version)
|
||||
iniset ${testfile} func_test auth_host ${KEYSTONE_SERVICE_HOST}
|
||||
|
12
stack.sh
12
stack.sh
@ -601,7 +601,7 @@ fi
|
||||
|
||||
# Keystone
|
||||
|
||||
if is_service_enabled key; then
|
||||
if is_service_enabled keystone; then
|
||||
# The ``SERVICE_TOKEN`` is used to bootstrap the Keystone database. It is
|
||||
# just a string and is not a 'real' Keystone token.
|
||||
read_password SERVICE_TOKEN "ENTER A SERVICE_TOKEN TO USE FOR THE SERVICE ADMIN TOKEN."
|
||||
@ -725,7 +725,7 @@ else
|
||||
fi
|
||||
|
||||
|
||||
if is_service_enabled key; then
|
||||
if is_service_enabled keystone; then
|
||||
if [ "$KEYSTONE_AUTH_HOST" == "$SERVICE_HOST" ]; then
|
||||
install_keystone
|
||||
configure_keystone
|
||||
@ -918,7 +918,7 @@ start_dstat
|
||||
# Keystone
|
||||
# --------
|
||||
|
||||
if is_service_enabled key; then
|
||||
if is_service_enabled keystone; then
|
||||
echo_summary "Starting Keystone"
|
||||
|
||||
if [ "$KEYSTONE_AUTH_HOST" == "$SERVICE_HOST" ]; then
|
||||
@ -1143,7 +1143,7 @@ if is_service_enabled g-reg; then
|
||||
fi
|
||||
|
||||
# Create an access key and secret key for nova ec2 register image
|
||||
if is_service_enabled key && is_service_enabled swift3 && is_service_enabled nova; then
|
||||
if is_service_enabled keystone && is_service_enabled swift3 && is_service_enabled nova; then
|
||||
eval $(openstack ec2 credentials create --user nova --project $SERVICE_TENANT_NAME -f shell -c access -c secret)
|
||||
iniset $NOVA_CONF DEFAULT s3_access_key "$access"
|
||||
iniset $NOVA_CONF DEFAULT s3_secret_key "$secret"
|
||||
@ -1226,7 +1226,7 @@ fi
|
||||
# This step also creates certificates for tenants and users,
|
||||
# which is helpful in image bundle steps.
|
||||
|
||||
if is_service_enabled nova && is_service_enabled key; then
|
||||
if is_service_enabled nova && is_service_enabled keystone; then
|
||||
USERRC_PARAMS="-PA --target-dir $TOP_DIR/accrc"
|
||||
|
||||
if [ -f $SSL_BUNDLE_FILE ]; then
|
||||
@ -1314,7 +1314,7 @@ if is_service_enabled horizon; then
|
||||
fi
|
||||
|
||||
# If Keystone is present you can point ``nova`` cli to this server
|
||||
if is_service_enabled key; then
|
||||
if is_service_enabled keystone; then
|
||||
echo "Keystone is serving at $KEYSTONE_SERVICE_URI/v2.0/"
|
||||
echo "Examples on using novaclient command line is in exercise.sh"
|
||||
echo "The default users are: admin and demo"
|
||||
|
@ -112,7 +112,7 @@ if is_service_enabled glance; then
|
||||
stop_glance
|
||||
fi
|
||||
|
||||
if is_service_enabled key; then
|
||||
if is_service_enabled keystone; then
|
||||
stop_keystone
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user