Skip to content

1.9: --fixed-cidr seems to be broken #17276

@ibuildthecloud

Description

@ibuildthecloud

Run the following to setup DIND:

docker run --privileged -v $(which docker):/usr/bin/docker -v /etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt -it busybox

Then in the container run

brctl addbr docker0
ip link add '172.18.42.1/16' dev docker0
ip link set dev docker0 up
docker daemon -D --fixed-cidr "172.18.42.1/16" -s vfs

This results in the below failure

DEBU[0000] Warning: could not change group /var/run/docker.sock to docker: Group docker not found 
DEBU[0000] Server created for HTTP on unix (/var/run/docker.sock) 
DEBU[0000] [graphdriver] trying provided driver "vfs"   
DEBU[0000] Using graph driver vfs                       
DEBU[0000] Using default logging driver json-file       
DEBU[0000] Creating images graph                        
DEBU[0000] Restored 0 elements                          
DEBU[0000] Creating repository list                     
DEBU[0000] Option DefaultDriver: bridge                 
DEBU[0000] Option DefaultNetwork: bridge                
INFO[0000] API listen on /var/run/docker.sock           
WARN[0000] Running modprobe bridge br_netfilter failed with message: modprobe: can't change directory to '/lib/modules': No such file or directory
, error: exit status 1 
WARN[0000] Running modprobe nf_nat failed with message: `modprobe: can't change directory to '/lib/modules': No such file or directory`, error: exit status 1 
DEBU[0000] Fail to initialize firewalld: Failed to connect to D-Bus system bus: dial unix /var/run/dbus/system_bus_socket: no such file or directory, using raw iptables instead 
DEBU[0000] /usr/sbin/iptables, [--wait -t nat -D PREROUTING -m addrtype --dst-type LOCAL -j DOCKER] 
DEBU[0000] /usr/sbin/iptables, [--wait -t nat -D OUTPUT -m addrtype --dst-type LOCAL ! --dst 127.0.0.0/8 -j DOCKER] 
DEBU[0000] /usr/sbin/iptables, [--wait -t nat -D OUTPUT -m addrtype --dst-type LOCAL -j DOCKER] 
DEBU[0000] /usr/sbin/iptables, [--wait -t nat -D PREROUTING] 
DEBU[0000] /usr/sbin/iptables, [--wait -t nat -D OUTPUT] 
DEBU[0000] /usr/sbin/iptables, [--wait -t nat -F DOCKER] 
DEBU[0000] /usr/sbin/iptables, [--wait -t nat -X DOCKER] 
DEBU[0000] /usr/sbin/iptables, [--wait -t nat -n -L DOCKER] 
DEBU[0000] /usr/sbin/iptables, [--wait -t nat -N DOCKER] 
DEBU[0000] /usr/sbin/iptables, [--wait -t filter -n -L DOCKER] 
DEBU[0000] /usr/sbin/iptables, [--wait -t filter -N DOCKER] 
DEBU[0000] Registering ipam provider: default           
DEBU[0000] Allocating IPv4 pools for network bridge (4ba652e9bbfcb90074b4ea7ab2822272eb130f2caf667b9408b970023399951c) 
DEBU[0000] RequestPool(LocalDefault, 172.18.0.0/16, 172.18.0.0/16, map[], false) 
DEBU[0000] RequestAddress(LocalDefault/172.18.0.0/16/172.18.0.0/16, <nil>, map[]) 
DEBU[0000] ReleasePool(LocalDefault/172.18.0.0/16/172.18.0.0/16) 
DEBU[0000] Cleaning up old shm/mqueue mounts: start.    
FATA[0000] Error starting daemon: Error initializing network controller: Error creating default "bridge" network: failed to allocate gateway (): No available addresses on this pool 

@mavenugo @aboch

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions