Browse Source

Set debug mode according to ENABLE_DEBUG_LOG_LEVEL

Docker turn off debug mode by default, but the non-debug mode
doesn't provide enough information for development. It is handy
to have a way to turn on the debug mode.

Change-Id: I403ea7cc43b0b0808bfac3ec6f9ac7586f4723f6
Hongbin Lu 1 year ago
parent
commit
718e499466
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      devstack/lib/docker

+ 7
- 0
devstack/lib/docker View File

@@ -83,10 +83,17 @@ function configure_docker {
83 83
         cluster_store_opts+="\"cluster-store\": \"$DOCKER_CLUSTER_STORE\","
84 84
     fi
85 85
     local docker_config_file=/etc/docker/daemon.json
86
+    local debug
87
+    if [[ "$ENABLE_DEBUG_LOG_LEVEL" == "True" ]]; then
88
+        debug=true
89
+    else
90
+        debug=false
91
+    fi
86 92
     sudo mkdir -p $(dirname ${docker_config_file})
87 93
     cat <<EOF | sudo tee $docker_config_file >/dev/null
88 94
 {
89 95
     $cluster_store_opts
96
+    "debug": ${debug},
90 97
     "group": "$DOCKER_GROUP",
91 98
     "hosts": [
92 99
         "unix://$DOCKER_ENGINE_SOCKET_FILE",

Loading…
Cancel
Save