Commit Graph

15 Commits

Author SHA1 Message Date
Daniel Norberg d4746d3ea0 bridge driver: clean up error returns
Docker-DCO-1.1-Signed-off-by: Daniel Norberg <daniel.norberg@gmail.com> (github: danielnorberg)
2014-04-10 11:26:48 -04:00
Daniel Norberg 336199a877 net: do not create -b/--bridge specified bridge
If the bridge specified using -b/--bridge doesn't
exist, fail instead of attempting to create it.

This is consistent with the docker documentation
on -b/--bridge: "Attach containers to a pre
existing network bridge". 

It is also less surprising in an environment where
the operator expected the bridge to be properly
set up before docker starts and expects docker to
fail fast if the bridge was not up instead of
masking this error and coming up in some
potentially broken state.

With this patch, docker still creates docker0 if
needed and no bridge was explicitly specified.

Docker-DCO-1.1-Signed-off-by: Daniel Norberg <daniel.norberg@gmail.com> (github: danielnorberg)
2014-04-10 11:11:17 -04:00
unclejack ceed9382d0 Merge pull request #4931 from crosbymichael/gen-mac-addr-for-bridge
Set bridge mac addr on supported kernels
2014-04-02 02:47:56 +03:00
Michael Crosby 6b7cfc9e95 Update test to reallocate port
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-01 07:27:34 +00:00
tjmehta 739d124480 make findNextPort circular, add all-ports-allocated error
Docker-DCO-1.1-Signed-off-by: Tejesh Mehta <tejesh.mehta@gmail.com> (github: tjmehta)
2014-03-31 22:21:52 -07:00
Michael Crosby 4cdcea2047 Set bridge mac addr on supported kernels
Fixes #3200
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-03-31 22:56:23 +00:00
Michael Crosby baba9cde95 Return error when existing bridge does not match ip
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-03-26 11:51:27 +00:00
Victor Vieux abef5cb0fc Merge pull request #4628 from kippandrew/port-allocator
Fix port collision with dynamically allocated ports
2014-03-25 14:30:10 -07:00
Victor Vieux 8944fb2e9b rename lxc to bridge
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-03-20 21:51:28 +00:00
Andy Kipp 555416fd02 Add err checks for port allocator tests
Docker-DCO-1.1-Signed-off-by: Andy Kipp <andy@rstudio.com> (github: kippandrew)
2014-03-18 13:30:21 -04:00
Andy Kipp 73c416a20d Be more explicit in finding next port to allocate
Docker-DCO-1.1-Signed-off-by: Andy Kipp <andy@rstudio.com> (github: kippandrew)
2014-03-18 13:30:21 -04:00
Andy Kipp 7a1db291fc Better test error message
Docker-DCO-1.1-Signed-off-by: Andy Kipp <andy@rstudio.com> (github: kippandrew)
2014-03-18 13:30:21 -04:00
Andy Kipp f7b6fbbd76 Prevent dynamic allocation of previously allocated ports
Docker-DCO-1.1-Signed-off-by: Andy Kipp <andy@rstudio.com> (github: kippandrew)
2014-03-18 13:30:21 -04:00
Michael Crosby 2bddcd68b4 Gofmt imports
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-03-17 11:41:28 -07:00
Michael Crosby 2230c9b9a7 Move networking drivers into runtime top level pkg
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-03-17 11:40:12 -07:00