moby icon indicating copy to clipboard operation
moby copied to clipboard

docker v0.8.0 doesn't honor "--bridge" parameter anymore

Open devweasel opened this issue 12 years ago • 1 comments

As of docker v0.8.0 using another bridge device doesn't seem to work anymore and always uses the built-in "docker0" bridge.

How to reproduce:

$ brctl show
bridge name     bridge id               STP enabled     interfaces
lxcbr0         8000.000000000000       no

$ docker -d -b=lxcbr0
[/var/lib/docker|94354eff] +job initserver()
[/var/lib/docker|94354eff.initserver()] Creating server
[/var/lib/docker|94354eff] +job init_networkdriver()
[/var/lib/docker|94354eff.init_networkdriver()] creating new bridge for docker0
[/var/lib/docker|94354eff.init_networkdriver()] getting iface addr
[/var/lib/docker|94354eff] -job init_networkdriver() = OK (0)
2014/02/06 15:48:54 WARNING: Your kernel does not support cgroup swap limit.
Loading containers: : done.
[/var/lib/docker|94354eff.initserver()] Creating pidfile
[/var/lib/docker|94354eff.initserver()] Setting up signal traps
[/var/lib/docker|94354eff] -job initserver() = OK (0)
[/var/lib/docker|94354eff] +job serveapi(unix:///var/run/docker.sock)
2014/02/06 15:48:54 Listening for HTTP on unix (/var/run/docker.sock)

$ brctl show
bridge name     bridge id               STP enabled     interfaces
docker0         8000.000000000000       no
lxcbr0         8000.000000000000       no

Any other combination of (already) existing and configured or non-existing bridges produces the above bahaviour as well.

Disabling networking on the other hand works as expected:

$ brctl show
bridge name     bridge id               STP enabled     interfaces
lxcbr0         8000.000000000000       no

$ docker -d -b=none
[/var/lib/docker|722ef0cb] +job initserver()
[/var/lib/docker|722ef0cb.initserver()] Creating server
2014/02/06 15:39:47 WARNING: Your kernel does not support cgroup swap limit.
Loading containers: : done.
[/var/lib/docker|722ef0cb.initserver()] Creating pidfile
[/var/lib/docker|722ef0cb.initserver()] Setting up signal traps
[/var/lib/docker|722ef0cb] -job initserver() = OK (0)
[/var/lib/docker|722ef0cb] +job serveapi(unix:///var/run/docker.sock)
2014/02/06 15:39:47 Listening for HTTP on unix (/var/run/docker.sock)

$ brctl show
bridge name     bridge id               STP enabled     interfaces
lxcbr0         8000.000000000000       no

After downgrading the package back to v0.7.6, attaching docker to an already existing bridge does work again as expected!

OS information: Ubuntu 12.04.4 LTS (amd64) Kernel version: 3.8.0-35-generic

Docker information: Client version: 0.8.0 Go version (client): go1.2 Git commit (client): cc3a8c8 Server version: 0.8.0 Git commit (server): cc3a8c8 Go version (server): go1.2 Last stable version: 0.8.0

Containers: 1 Images: 24 Driver: aufs Root Dir: /var/lib/docker/aufs Dirs: 26 WARNING: No swap limit support

devweasel avatar Feb 06 '14 15:02 devweasel

Dup of #3942 and this has been fixed. See the merged PR in that issue.

crosbymichael avatar Feb 06 '14 15:02 crosbymichael