Browse code

Use userrc_early for all nodes

Instead of only using the userrc_early when keystone
is an enabled service we will do it on all runs of
stack.sh. This way services can be split up more
across devstack nodes, and you can do configuration
requiring credentials on nodes that don't install
keystone.

Change-Id: I74574ae9f45a74bcbcc8e3149228ecb795ab4fb7

Patrick East authored on 2016/08/04 06:44:53
Showing 1 changed files
... ...
@@ -1021,21 +1021,12 @@ start_dstat
1021 1021
 # Keystone
1022 1022
 # --------
1023 1023
 
1024
-if is_service_enabled keystone; then
1025
-    echo_summary "Starting Keystone"
1026
-
1027
-    if [ "$KEYSTONE_AUTH_HOST" == "$SERVICE_HOST" ]; then
1028
-        init_keystone
1029
-        start_keystone
1030
-        bootstrap_keystone
1031
-    fi
1032
-
1033
-    # Rather than just export these, we write them out to a
1034
-    # intermediate userrc file that can also be used to debug if
1035
-    # something goes wrong between here and running
1036
-    # tools/create_userrc.sh (this script relies on services other
1037
-    # than keystone being available, so we can't call it right now)
1038
-    cat > $TOP_DIR/userrc_early <<EOF
1024
+# Rather than just export these, we write them out to a
1025
+# intermediate userrc file that can also be used to debug if
1026
+# something goes wrong between here and running
1027
+# tools/create_userrc.sh (this script relies on services other
1028
+# than keystone being available, so we can't call it right now)
1029
+cat > $TOP_DIR/userrc_early <<EOF
1039 1030
 # Use this for debugging issues before files in accrc are created
1040 1031
 
1041 1032
 # Set up password auth credentials now that Keystone is bootstrapped
... ...
@@ -1050,12 +1041,21 @@ export OS_REGION_NAME=$KEYSTONE_REGION_NAME
1050 1050
 
1051 1051
 EOF
1052 1052
 
1053
-    if is_service_enabled tls-proxy; then
1054
-        echo "export OS_CACERT=$INT_CA_DIR/ca-chain.pem" >> $TOP_DIR/userrc_early
1055
-        start_tls_proxy http-services '*' 443 $SERVICE_HOST 80
1056
-    fi
1053
+if is_service_enabled tls-proxy; then
1054
+    echo "export OS_CACERT=$INT_CA_DIR/ca-chain.pem" >> $TOP_DIR/userrc_early
1055
+    start_tls_proxy http-services '*' 443 $SERVICE_HOST 80
1056
+fi
1057
+
1058
+source $TOP_DIR/userrc_early
1059
+
1060
+if is_service_enabled keystone; then
1061
+    echo_summary "Starting Keystone"
1057 1062
 
1058
-    source $TOP_DIR/userrc_early
1063
+    if [ "$KEYSTONE_AUTH_HOST" == "$SERVICE_HOST" ]; then
1064
+        init_keystone
1065
+        start_keystone
1066
+        bootstrap_keystone
1067
+    fi
1059 1068
 
1060 1069
     create_keystone_accounts
1061 1070
     create_nova_accounts