Commit Graph

188 Commits

Author SHA1 Message Date
Alessandro Boch
91bc12ef2d 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
ede31dce0a 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
511459f1af 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
9a7cceced6 Added RemoveInterface support to sandbox.
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-06 00:34:38 +00:00
Madhu Venugopal
8d2339324e 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
0c167ba011 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
fe2c704109 Merge pull request #119 from aboch/fmzhen-test-dev
Separate ExpsoedPorts from PortBindings
2015-05-05 16:26:41 -07:00
Alessandro Boch
f21785e451 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
417093c3f5 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
6bb9881907 Merge pull request #118 from mrjana/cnm_integ
Link integration fixes
2015-05-05 16:07:37 -07:00
Madhu Venugopal
4abc259f84 Merge pull request #117 from aboch/pt
Protect internal data in CreateOptionPortMapping
2015-05-05 13:57:24 -07:00
Jana Radhakrishnan
9897c23464 - 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
c203b3959e 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
3098ee6628 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
fe87ce50bc Merge pull request #116 from mavenugo/master
Incorrect assumption with golang net package causes Overlapping IP
v0.2-pre-integ
2015-05-04 22:42:05 -07:00
Madhu Venugopal
3678144103 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
5d28b9f14c Merge pull request #108 from mrjana/cnm_integ
Docker integration commits
2015-05-04 22:26:27 -07:00
Jana Radhakrishnan
5f9906ddff - 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
a7ac2c7454 Added mac address to EndpointInfo
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-05 03:27:34 +00:00
Jana Radhakrishnan
418da5befb 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
ac1c5af15f Added support for /etc/resolv.conf
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-05 00:16:36 +00:00
Jana Radhakrishnan
d35bd47790 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
c8062e4ad4 Added "host" driver and test code.
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-05 00:16:25 +00:00
Jana Radhakrishnan
eeb243ca54 - 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
bce6960c98 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
eee24e4cec Merge pull request #110 from aboch/ed
Provide API to retrieve Endpoint operational data
2015-05-04 16:50:11 -07:00
Jana Radhakrishnan
df2327aec9 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
8e3458283e 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
f42056ad40 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
6261f5535c Merge pull request #107 from mavenugo/link_pm
Link Implementation for Bridge Driver
2015-05-03 14:44:13 -07:00
Madhu Venugopal
bd00a055ee Link implementation in bridge driver
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-03 14:36:55 -07:00
Madhu Venugopal
ba38542e95 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
5025c5395f Merge pull request #102 from aboch/pm
Bridge to handle port mapping
2015-05-03 00:15:01 -07:00
Alessandro Boch
dd65231f1c 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
18e3679789 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
eecfd7acb5 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
3bb407a21f 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
e321761977 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
2e27ab5aad Join / Leave Driver API
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-01 13:38:26 -07:00
Madhu Venugopal
3686b72c56 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
b041485b68 Merge pull request #101 from aboch/vrd
Control scope of JoinOption functions
2015-04-30 13:49:14 -07:00
Alessandro Boch
6dcd957b12 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
0e34c21f8c 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
95068e6583 Updated Godeps
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-04-30 06:32:52 +00:00
Jana Radhakrishnan
ce3965049e - 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
b966b4a995 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
5b800ca696 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
aeeb2fa909 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
Jana Radhakrishnan
68ba9ca5aa Merge pull request #98 from aboch/icc
Port PR #11526 to libnetwork
2015-04-29 11:56:34 -07:00
Madhu Venugopal
e91f827b23 Merge pull request #95 from mrjana/cnm_integ
Add support for Join/Leave methods to Endpoint
2015-04-29 11:55:11 -07:00