Skip to content

Commit 7adf15d

Browse files
committed
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
1 parent 17491f3 commit 7adf15d

1 file changed

Lines changed: 21 additions & 8 deletions

File tree

stack.sh

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,14 +1007,27 @@ if is_service_enabled keystone; then
10071007
# Begone token auth
10081008
unset OS_TOKEN OS_URL
10091009

1010-
# Set up password auth credentials now that Keystone is bootstrapped
1011-
export OS_AUTH_URL=$KEYSTONE_AUTH_URI
1012-
export OS_USERNAME=admin
1013-
export OS_USER_DOMAIN_ID=default
1014-
export OS_PASSWORD=$ADMIN_PASSWORD
1015-
export OS_PROJECT_NAME=admin
1016-
export OS_PROJECT_DOMAIN_ID=default
1017-
export OS_REGION_NAME=$REGION_NAME
1010+
# Rather than just export these, we write them out to a
1011+
# intermediate userrc file that can also be used to debug if
1012+
# something goes wrong between here and running
1013+
# tools/create_userrc.sh (this script relies on services other
1014+
# than keystone being available, so we can't call it right now)
1015+
cat > $TOP_DIR/userrc_early <<EOF
1016+
# Use this for debugging issues before files in accrc are created
1017+
1018+
# Set up password auth credentials now that Keystone is bootstrapped
1019+
export OS_AUTH_URL=$KEYSTONE_AUTH_URI
1020+
export OS_USERNAME=admin
1021+
export OS_USER_DOMAIN_ID=default
1022+
export OS_PASSWORD=$ADMIN_PASSWORD
1023+
export OS_PROJECT_NAME=admin
1024+
export OS_PROJECT_DOMAIN_ID=default
1025+
export OS_REGION_NAME=$REGION_NAME
1026+
1027+
EOF
1028+
1029+
source $TOP_DIR/userrc_early
1030+
10181031
fi
10191032

10201033
# Write a clouds.yaml file

0 commit comments

Comments
 (0)