Browse Source

Removing the confusing SWARM_MODE variable

The SWARM_MODE variable is for determining whether to set the
cluster_store options of docker daemon. Therefore, change it to
DOCKER_CLUSTER_STORE to make it clear.

Change-Id: I79f00c7cc158d825627ce6a9d28b053b0cf3c076
changes/27/461227/1
Hongbin Lu 2 years ago
parent
commit
d9cbc6c325
1 changed files with 3 additions and 4 deletions
  1. 3
    4
      devstack/lib/docker

+ 3
- 4
devstack/lib/docker View File

@@ -4,7 +4,6 @@
4 4
 #
5 5
 # - functions
6 6
 # - ``STACK_USER`` must be defined
7
-# - ``ETCD_PORT`` must be defined if on swarm mode
8 7
 
9 8
 # stack.sh
10 9
 # ---------
@@ -24,7 +23,7 @@ set +o xtrace
24 23
 
25 24
 DOCKER_ENGINE_SOCKET_FILE=${DOCKER_ENGINE_SOCKET_FILE:-/var/run/docker.sock}
26 25
 DOCKER_ENGINE_PORT=${DOCKER_ENGINE_PORT:-2375}
27
-SWARM_MODE=$(trueorfalse False SWARM_MODE)
26
+DOCKER_CLUSTER_STORE=${DOCKER_CLUSTER_STORE:-}
28 27
 
29 28
 
30 29
 # Functions
@@ -75,8 +74,8 @@ function configure_docker {
75 74
     sudo systemctl stop docker.service || true
76 75
 
77 76
     local cluster_store_opts=""
78
-    if [[ "$SWARM_MODE" = "True" ]]; then
79
-        cluster_store_opts+="\"cluster-store\": \"etcd://localhost:$ETCD_PORT\","
77
+    if [[ -n "$DOCKER_CLUSTER_STORE" ]]; then
78
+        cluster_store_opts+="\"cluster-store\": \"$DOCKER_CLUSTER_STORE\","
80 79
     fi
81 80
     local docker_config_file=/etc/docker/daemon.json
82 81
     sudo mkdir -p $(dirname ${docker_config_file})

Loading…
Cancel
Save