Browse Source

Configure the dokcer daemon for IPv6

Change-Id: If190af800a8c28e2cf4ae320a770c40847cd18e6
Feng Shengqin 2 months ago
parent
commit
b8ff250e97
2 changed files with 9 additions and 0 deletions
  1. 8
    0
      devstack/lib/docker
  2. 1
    0
      devstack/settings

+ 8
- 0
devstack/lib/docker View File

@@ -28,6 +28,7 @@ DOCKER_GROUP=${DOCKER_GROUP:-$STACK_USER}
28 28
 DOCKER_CGROUP_DRIVER=${DOCKER_CGROUP_DRIVER:-}
29 29
 ENABLE_CLEAR_CONTAINER=$(trueorfalse False ENABLE_CLEAR_CONTAINER)
30 30
 ENABLE_LIVE_RESTORE=$(trueorfalse False ENABLE_LIVE_RESTORE)
31
+ENABLE_IPV6=$(trueorfalse False ENABLE_IPV6)
31 32
 
32 33
 # Functions
33 34
 # ---------
@@ -112,6 +113,7 @@ function configure_docker {
112 113
     local docker_config_file=/etc/docker/daemon.json
113 114
     local debug
114 115
     local live_restore
116
+    local ipv6
115 117
     if [[ "$ENABLE_DEBUG_LOG_LEVEL" == "True" ]]; then
116 118
         debug=true
117 119
     else
@@ -122,6 +124,11 @@ function configure_docker {
122 124
     else
123 125
         live_restore=false
124 126
     fi
127
+    if [[ "$ENABLE_IPV6" == "True" ]]; then
128
+        ipv6=true
129
+    else
130
+        ipv6=false
131
+    fi
125 132
     sudo mkdir -p $(dirname ${docker_config_file})
126 133
     cat <<EOF | sudo tee $docker_config_file >/dev/null
127 134
 {
@@ -129,6 +136,7 @@ function configure_docker {
129 136
     $runtime_opts
130 137
     "debug": ${debug},
131 138
     "live-restore": ${live_restore},
139
+    "ipv6": ${ipv6},
132 140
     "group": "$DOCKER_GROUP",
133 141
 EOF
134 142
     if [[ -n "$DOCKER_CGROUP_DRIVER" ]]; then

+ 1
- 0
devstack/settings View File

@@ -4,6 +4,7 @@
4 4
 CONTAINER_ENGINE=${CONTAINER_ENGINE:-docker}
5 5
 ENABLE_CLEAR_CONTAINER=${ENABLE_CLEAR_CONTAINER:-false}
6 6
 ENABLE_LIVE_RESTORE=${ENABLE_LIVE_RESTORE:-false}
7
+ENABLE_IPV6=${ENABLE_IPV6:-false}
7 8
 
8 9
 # Enable container services
9 10
 enable_service container

Loading…
Cancel
Save