Commit graph

2840 commits

Author SHA1 Message Date
Jana Radhakrishnan
c9b54861e7 - Moved label definitions to a new package
- Added a network scope well-defined label
  to enable ipv6

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-06 17:21:19 +00:00
Madhu Venugopal
1402220ec3 Merge pull request #111 from aboch/lk
In bridge.go: Join(), Leave(), getnetwork() are not thread safe
2015-05-06 09:29:56 -07:00
Alessandro Boch
dc3a4a007c In bridge.go: Join(), Leave(), getnetwork() are not thread safe
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-05-05 19:07:05 -07:00
Madhu Venugopal
7afc893992 Merge pull request #121 from mrjana/cnm_integ
Properly handle leave in libnetwork and bridge driver
2015-05-05 18:30:29 -07:00
Jana Radhakrishnan
ff36e97f45 Properly handle Leave by
- Removing interface from the sandbox
  - Deleting Iptable rules in the bridge driver

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-06 00:34:38 +00:00
Jana Radhakrishnan
f055e06f3a Added RemoveInterface support to sandbox.
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-06 00:34:38 +00:00
Madhu Venugopal
d96a409c6a Merge pull request #120 from dave-tucker/fix-ci
Don't fail the build on coveralls upload
2015-05-05 17:06:38 -07:00
Dave Tucker
8c2d72096f Don't fail the build on coveralls upload
If we can't upload to coveralls, don't fail the build.

Goveralls and Coveralls have been a little flaky and started throwing
http 422 errors, although I still see coverage being reported.

It's best in the interim to ignore these, although this should be
removed in future when the service is more stable

Signed-off-by: Dave Tucker <dt@docker.com>
2015-05-06 00:49:41 +01:00
Madhu Venugopal
5b576f4dcc Merge pull request #119 from aboch/fmzhen-test-dev
Separate ExpsoedPorts from PortBindings
2015-05-05 16:26:41 -07:00
Alessandro Boch
ec4e1da3c5 Separate ExposedPorts from PortBindings in libnetwork API
- Fix missing code in tests in 64cceb37ad1c16884d709fd49fba34e8a99d8c41

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-05-05 16:17:17 -07:00
Mingzhen Feng
8265de6325 chang the type of ports form PortBinding to TransportPort in link.go
Signed-off-by: Mingzhen Feng <fmzhen@zju.edu.cn>
2015-05-05 16:17:17 -07:00
Madhu Venugopal
ac5e6d30ef Merge pull request #118 from mrjana/cnm_integ
Link integration fixes
2015-05-05 16:07:37 -07:00
Madhu Venugopal
716a41551e Merge pull request #117 from aboch/pt
Protect internal data in CreateOptionPortMapping
2015-05-05 13:57:24 -07:00
Jana Radhakrishnan
3b8b2ffee8 - Changed ContainerConfiguration to simply use strings
- Made ContainerConfiguration fields to be exported so
  options package can access them.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-05 20:52:12 +00:00
Alessandro Boch
eb98e212cb Reuse existing docker chain constant in link.go
- in bridge driver

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-05-04 23:53:32 -07:00
Alessandro Boch
706c01073d CreateOptionPortMapping to store a copy of the passed bindings
- Given this will be internal data, make a defensive copy to
  protect from client inadvertently modifications.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-05-04 23:45:07 -07:00
Jana Radhakrishnan
288a6b8c49 Merge pull request #116 from mavenugo/master
Incorrect assumption with golang net package causes Overlapping IP
2015-05-04 22:42:05 -07:00
Madhu Venugopal
d4851b95ec Incorrect assumption with golang net package causes Overlapping IP
using a len(net.IP) to check for ipv4 or ipv6 is a bad idea.
And that was exactly done in NetworkOverlaps() function with the
assumption that any ipv4 net.IP will be of 4 bytes. Golang Net package
makes no such assumptions.

This assumption actually broke a particular use-case where the
NetworkOverlaps fails to identify a genuine overlap and that causes
datapath issues.

With this fix, we explicitely check for v4 or v6

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-04 22:31:16 -07:00
Madhu Venugopal
2979369c45 Merge pull request #108 from mrjana/cnm_integ
Docker integration commits
2015-05-04 22:26:27 -07:00
Jana Radhakrishnan
55099e9656 - Removed sandbox override option from the driver.
- Reworked the host network mode support by introducing
  a new JoinOption.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-05 04:26:23 +00:00
Jana Radhakrishnan
a983569c0c Added mac address to EndpointInfo
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-05 03:27:34 +00:00
Jana Radhakrishnan
560d156e36 Replaced all proto numbers in netutils with the defined const
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-05 00:16:36 +00:00
Jana Radhakrishnan
db2f7c6f28 Added support for /etc/resolv.conf
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-05 00:16:36 +00:00
Jana Radhakrishnan
4399989c53 Updated Godeps to the latest versions of docker packages.
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-05 00:16:36 +00:00
Jana Radhakrishnan
5f8bfa8ade Added "host" driver and test code.
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-05 00:16:25 +00:00
Jana Radhakrishnan
66eb3e1cd4 - Added support for JoinInfo so that driver can override certain
container config.
- Added JoinOption processing for extra /etc/hosts record.
- Added support for updating /etc/hosts entries of other containers.
- Added sandbox support for adding a sandbox without the OS level create.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-05 00:09:11 +00:00
Jana Radhakrishnan
68cae04fe9 Fixed a bug in bridge driver when docker0 has no IP
address it doesn't select and configure a proper IP address.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-05 00:09:11 +00:00
Madhu Venugopal
def2a1192f Merge pull request #110 from aboch/ed
Provide API to retrieve Endpoint operational data
2015-05-04 16:50:11 -07:00
Jana Radhakrishnan
85c61c1fcd Merge pull request #113 from mavenugo/master
Fix a minor but in utils parsing UDP/TCP ports
2015-05-04 16:43:41 -07:00
Madhu Venugopal
30e2ee9793 Fix a minor but in utils parsing UDP/TCP ports
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-04 16:28:51 -07:00
Alessandro Boch
56741e7d60 Provide API to retrieve Endpoint operational data
- from the driver

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-05-04 14:54:48 -07:00
Jana Radhakrishnan
76ac418c43 Merge pull request #107 from mavenugo/link_pm
Link Implementation for Bridge Driver
2015-05-03 14:44:13 -07:00
Madhu Venugopal
446b158581 Link implementation in bridge driver
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-03 14:36:55 -07:00
Madhu Venugopal
95c5eb2856 Ignoring Driver failure on Leave.
After some delibration, we think it is better not to hold onto the
sandbox resources if an explicit call to Leave fails by the Driver.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-03 07:29:24 -07:00
Jana Radhakrishnan
284c1713e8 Merge pull request #102 from aboch/pm
Bridge to handle port mapping
2015-05-03 00:15:01 -07:00
Alessandro Boch
da97978469 Remove redundant code in endpoint.go
- JoinOption, LeaveOption, EndpointOption are all the same thing

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-05-02 23:55:37 -07:00
Alessandro Boch
da1cddc320 Bridge to handle port mapping
- libnetwork cares for list of exposed ports, driver cares
  for list of port bindings. At endpoint creation:
  - list of exposed ports will be passed as libnetwork otion
  - list of port mapping will be passed as driver option

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-05-02 23:25:01 -07:00
Alessandro Boch
781bcc94a7 Params of non-exported struct should be non-exported
- in error.go

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-05-02 17:30:20 -07:00
Alessandro Boch
bfc5721970 Re-arrange MAC election code for sandbox iface
- in bridge.go

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-05-02 17:30:11 -07:00
Jana Radhakrishnan
3e19e4cff9 Merge pull request #105 from mavenugo/joinleave
Join Leave Driver API and minor updates to the existing NB APIs
2015-05-01 13:52:01 -07:00
Madhu Venugopal
9db6a1b8e4 Join / Leave Driver API
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-01 13:38:26 -07:00
Madhu Venugopal
cc4f27f6af Minor API modifications
* Modified NB API with self referential var-aarg for future proofing the APIs
* Modified Driver API's option parameter to be a Map of interface{}

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-01 10:49:25 -07:00
Madhu Venugopal
8de4608de7 Merge pull request #101 from aboch/vrd
Control scope of JoinOption functions
2015-04-30 13:49:14 -07:00
Alessandro Boch
0d3ad0eaee Control scope of JoinOption functions
ISSUE:
- JoinOption type takes the exported interface Endpoint as parameter.
  This does not allows libnetwork to control the setter functions
  which will be executed by processOptions(). Client can now craft
  any func (e Endpoint), pass it to Endpoint.Join() and have it executed.
  Beside the fact this allows the client to shot himself in the foot,
  there seem not to be a real need in having the JoinOption take the
  Endpoint interface as parameter.

CHANGE:
- Changing the JoinOption signature to take a pointer to the unexported
  endpoint structure. So now libnetwork is the only one that can define
  the Join() method's options setter functions via the self referenced
  JoinOption[...] functions.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-04-30 10:49:31 -07:00
Madhu Venugopal
d1e53e93bf Merge pull request #100 from mrjana/cnm_integ
Add basic /etc/hosts file management support in libnetwork
2015-04-30 05:58:20 -07:00
Jana Radhakrishnan
4bf442a510 Updated Godeps
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-04-30 06:32:52 +00:00
Jana Radhakrishnan
b8f81862d0 - Added Join option support
- Added basic /etc/hosts generation support in libnetwork

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-04-30 05:58:12 +00:00
Jana Radhakrishnan
d684600cdf Added null driver support for handling --net=none and -n=false cases
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-04-30 05:56:59 +00:00
Madhu Venugopal
ea5f37466e Merge pull request #99 from mrjana/cnm_integ
Reorganize the libnetwork code to separate Controller, Network and Endpoint
2015-04-29 19:33:46 -07:00
Jana Radhakrishnan
713ff79ed5 Reorganized the libnetwork code to seperate Controller, Network and Endpoint
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-04-30 01:25:01 +00:00