Description
using the list of default-address-pools in daemon.json in different orders leads to the configuration error:
failed to start daemon: Error initializing network controller:
Error creating default "bridge" network:
failed to parse pool request for address space "LocalDefault" pool "fc00:1337:1337::/80" subpool "127.16.0.0/12":
failed to compute range's lowest ip address:
cannot compute host portion ip address because ip and mask are not compatible:
(net.IP{0x7f, 0x10, 0x0, 0x0}, net.IPMask{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0})
Reproduce
Working order (ipv4 first):
"default-address-pools": [
{
"base": "172.16.0.0/12",
"size": 24
},
{
"base": "fc00:1337:1337::0/64",
"size": 80
}
Broken order (ipv6 first):
"default-address-pools": [
{
"base": "fc00:1337:1337::0/64",
"size": 80
},
{
"base": "172.16.0.0/12",
"size": 24
}
Expected behavior
a list in json configuration should not be order dependent
docker version
Client: Docker Engine - Community
Version: 20.10.18
API version: 1.41
Go version: go1.18.6
Git commit: b40c2f6
Built: Thu Sep 8 23:11:45 2022
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.18
API version: 1.41 (minimum version 1.12)
Go version: go1.18.6
Git commit: e42327a
Built: Thu Sep 8 23:09:37 2022
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.8
GitCommit: 9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6
runc:
Version: 1.1.4
GitCommit: v1.1.4-0-g5fd4c4d
docker-init:
Version: 0.19.0
GitCommit: de40ad0
docker info
Client:
Context: default
Debug Mode: false
Plugins:
app: Docker App (Docker Inc., v0.9.1-beta3)
buildx: Docker Buildx (Docker Inc., v0.9.1-docker)
Server:
Containers: 5
Running: 5
Paused: 0
Stopped: 0
Images: 12
Server Version: 20.10.18
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runtime.v1.linux runc io.containerd.runc.v2
Default Runtime: runc
Init Binary: docker-init
containerd version: 9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6
runc version: v1.1.4-0-g5fd4c4d
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 5.4.0-126-generic
Operating System: Ubuntu 20.04.5 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.84GiB
Name: <hostname>
ID: AVF6:M5H3:LGQI:JWEX:SWVQ:VQTV:S6PE:3ZLA:T42S:E2SM:JVRQ:TVHP
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Default Address Pools:
Base: 172.16.0.0/12, Size: 24
Base: fc00:1337:1337::0/64, Size: 80
WARNING: No swap limit support
Additional Info
This should either be fixed or its behavior should be well-documented for the option (which is currently quite underdocumented anyways...)
Description
using the list of
default-address-poolsin daemon.json in different orders leads to the configuration error:Reproduce
Working order (ipv4 first):
Broken order (ipv6 first):
Expected behavior
a list in json configuration should not be order dependent
docker version
docker info
Additional Info
This should either be fixed or its behavior should be well-documented for the option (which is currently quite underdocumented anyways...)