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
... | ... |
@@ -1007,14 +1007,27 @@ if is_service_enabled keystone; then |
1007 | 1007 |
# Begone token auth |
1008 | 1008 |
unset OS_TOKEN OS_URL |
1009 | 1009 |
|
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 |
+ |
|
1018 | 1031 |
fi |
1019 | 1032 |
|
1020 | 1033 |
# Write a clouds.yaml file |