Browse code

Merge "Add a debugging userrc after keystone is up"

Jenkins authored on 2015/10/14 12:05:44
Showing 1 changed files
... ...
@@ -1016,14 +1016,27 @@ if is_service_enabled keystone; then
1016 1016
     # Begone token auth
1017 1017
     unset OS_TOKEN OS_URL
1018 1018
 
1019
-    # Set up password auth credentials now that Keystone is bootstrapped
1020
-    export OS_AUTH_URL=$KEYSTONE_AUTH_URI
1021
-    export OS_USERNAME=admin
1022
-    export OS_USER_DOMAIN_ID=default
1023
-    export OS_PASSWORD=$ADMIN_PASSWORD
1024
-    export OS_PROJECT_NAME=admin
1025
-    export OS_PROJECT_DOMAIN_ID=default
1026
-    export OS_REGION_NAME=$REGION_NAME
1019
+    # Rather than just export these, we write them out to a
1020
+    # intermediate userrc file that can also be used to debug if
1021
+    # something goes wrong between here and running
1022
+    # tools/create_userrc.sh (this script relies on services other
1023
+    # than keystone being available, so we can't call it right now)
1024
+    cat > $TOP_DIR/userrc_early <<EOF
1025
+# Use this for debugging issues before files in accrc are created
1026
+
1027
+# Set up password auth credentials now that Keystone is bootstrapped
1028
+export OS_AUTH_URL=$KEYSTONE_AUTH_URI
1029
+export OS_USERNAME=admin
1030
+export OS_USER_DOMAIN_ID=default
1031
+export OS_PASSWORD=$ADMIN_PASSWORD
1032
+export OS_PROJECT_NAME=admin
1033
+export OS_PROJECT_DOMAIN_ID=default
1034
+export OS_REGION_NAME=$REGION_NAME
1035
+
1036
+EOF
1037
+
1038
+    source $TOP_DIR/userrc_early
1039
+
1027 1040
 fi
1028 1041
 
1029 1042
 # Write a clouds.yaml file