Add a debugging userrc after keystone is up

As a follow-on to the issues raised by
I069f46f95656655ae7ba8f3dd929f47eae594b68, rather than a re-write of
create_userrc.sh logic, create a temporary userrc that can be helpful
for debugging until we have the whole system bootstrapped

Change-Id: I3325acffd259cf7f6f4a153c88037cfe8405ca50
This commit is contained in:
Ian Wienand 2015-09-23 11:56:02 +10:00
parent 17491f37d7
commit 7adf15df5c

View File

@ -1007,14 +1007,27 @@ if is_service_enabled keystone; then
# Begone token auth # Begone token auth
unset OS_TOKEN OS_URL unset OS_TOKEN OS_URL
# Set up password auth credentials now that Keystone is bootstrapped # Rather than just export these, we write them out to a
export OS_AUTH_URL=$KEYSTONE_AUTH_URI # intermediate userrc file that can also be used to debug if
export OS_USERNAME=admin # something goes wrong between here and running
export OS_USER_DOMAIN_ID=default # tools/create_userrc.sh (this script relies on services other
export OS_PASSWORD=$ADMIN_PASSWORD # than keystone being available, so we can't call it right now)
export OS_PROJECT_NAME=admin cat > $TOP_DIR/userrc_early <<EOF
export OS_PROJECT_DOMAIN_ID=default # Use this for debugging issues before files in accrc are created
export OS_REGION_NAME=$REGION_NAME
# Set up password auth credentials now that Keystone is bootstrapped
export OS_AUTH_URL=$KEYSTONE_AUTH_URI
export OS_USERNAME=admin
export OS_USER_DOMAIN_ID=default
export OS_PASSWORD=$ADMIN_PASSWORD
export OS_PROJECT_NAME=admin
export OS_PROJECT_DOMAIN_ID=default
export OS_REGION_NAME=$REGION_NAME
EOF
source $TOP_DIR/userrc_early
fi fi
# Write a clouds.yaml file # Write a clouds.yaml file