Commit Graph

123 Commits

Author SHA1 Message Date
Madhu Venugopal
043a23ae12 Merge pull request #87 from mrjana/cnm_integ
Fix assortment of sandbox issues
2015-04-24 06:01:48 -07:00
Madhu Venugopal
1933403d30 Merge pull request #86 from aboch/utm
Libnetwork bridge to handle MTU option
2015-04-24 05:59:47 -07:00
Madhu Venugopal
966c9a8884 Merge pull request #85 from aboch/drv
Refactor NetworkController interface
2015-04-24 05:56:52 -07:00
Jana Radhakrishnan
61d75554ae - Re-enabled Bridge test case which got disabled because
lower case test case function name

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-04-24 05:18:03 +00:00
Jana Radhakrishnan
eca040df2b - Fixed an assortment of bugs in sandbox
- Added more test coverage to sandbox

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-04-24 05:17:50 +00:00
Alessandro Boch
70b7d259af Refactor NetworkController interface
- To reflect work flow. NewDriver() => ConfigureDriver()
  and no NetworkDriver returned.
  libnetwork clients would refer to a driver/network type, then
  internally controller will retrieve the correspondent driver
  instance, but this is not a concern of the clients.
- Remove NetworkDriver interface
- Removed stale blank dependency on bridge in libnetwork_test.go

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-04-23 18:46:01 -07:00
Alessandro Boch
cfa284ed18 Libnetwork bridge to handle MTU option
- This address one of the requirements of Issue #78
- Bridge MTU will be enforced on the veth pair ifaces
  for each endpoint being added to the network.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-04-23 18:42:38 -07:00
Madhu Venugopal
810a4676c2 Merge pull request #84 from aboch/mao
Libnetwork bridge to handle --mac-address option
2015-04-23 16:40:07 -07:00
Alessandro Boch
75d7d43f9c Libnetwork bridge to handle --mac-address option
- This addresses one requirement from Issue #79
- Defined EndpointConfiguration struct for bridge driver
  which contains the user's preferred mac address for the
  sanbox interface

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-04-23 13:03:34 -07:00
Jana Radhakrishnan
9bdba881be Merge pull request #82 from dave-tucker/simplebridge
Rename simplebridge to bridge
2015-04-23 11:22:44 -07:00
Madhu Venugopal
d17b3c32b2 Merge pull request #69 from aboch/cup
Issue #68: In bridge.go driver remove veth on endpoint delete
2015-04-23 11:06:06 -07:00
Dave Tucker
ee4b5cc7e3 Rename simplebridge to bridge
Fixes #81

Signed-off-by: Dave Tucker <dt@docker.com>
2015-04-23 10:49:57 -07:00
Alessandro Boch
67ccf8ec77 Issue #68: In bridge.go driver remove veth on endpoint delete
- Store *Interface on endpoint create
- Remove from bridgeEndpoint ip params now available in Interface
- On endpoint delete attempt a removal of veth plugged into bridge
- (tested disabling defer netutils.SetupTestNetNS(t)() in libnetwrok_test)
- Fix bridge to  store endpoints per sandbox
- Fix bug in error.go which causes stack overflow
- Start bridge error string w/ lower case as per go convention

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-04-22 09:35:47 -07:00
Madhu Venugopal
3b184f863f Merge pull request #77 from fmzhen/test-dev
Add TestSandboxInfoEqual in sandbox_test.go
2015-04-21 20:55:28 -07:00
Mingzhen Feng
3d34a574ad Add TestSandboxInfoEqual in sandbox_test.go
Signed-off-by: Mingzhen Feng <fmzhen@zju.edu.cn>
2015-04-22 10:04:03 +08:00
Madhu Venugopal
686ce2c14d Merge pull request #73 from aboch/rewdep
Refactor driverapi, sandbox pkgs
2015-04-21 15:33:11 -07:00
Alessandro Boch
778e2a72b3 Refactor driverapi, sandbox pkgs
- Move SanboxInfo and Interface structures in sandbox package
  (changed it to Info as per golint)
- Move UUID to new internal pkg types
- Updated .gitignore to ignore IDE project files

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-04-21 09:44:39 -07:00
Jana Radhakrishnan
ddd11cce43 Merge pull request #76 from mbanikazemi/75-typos
Fixing a few typos
2015-04-20 21:25:09 -07:00
Madhu Venugopal
74119651d1 Merge pull request #66 from aboch/net
Add Network method to return list of endpoints
2015-04-20 12:13:26 -07:00
Madhu Venugopal
688cf5c646 Merge pull request #63 from aboch/qr
Enhance Endpoint interface
2015-04-20 12:08:42 -07:00
Mohammad Banikazemi
9e3d6b5902 Fixing a few typos
Signed-off-by: Mohammad Banikazemi <mbanikazemi@gmail.com>
2015-04-20 13:08:09 -04:00
Alessandro Boch
c60935a41a Enhance Endpoint interface
- Added new getter methods
- Modified signature of Network.CreateEndpoint()

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-04-20 03:21:01 -07:00
Madhu Venugopal
bf9450eec0 Merge pull request #67 from liubin/fixtypos
fix some typos
2015-04-20 03:17:37 -07:00
Madhu Venugopal
213a988b95 Merge pull request #65 from aboch/godeps
Update Godeps docker/pkg/common => /stringid
2015-04-20 03:16:41 -07:00
Jana Radhakrishnan
dddec4bd84 Merge pull request #64 from aboch/gdp
Fix libnetwork_test.go
2015-04-19 22:52:33 -07:00
bin liu
f8e436522e fix some typos
Signed-off-by: bin liu <liubin0329@gmail.com>
2015-04-20 04:12:54 +00:00
Alessandro Boch
972c798cf0 Add Network method to return list of endpoints
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-04-17 23:14:51 -07:00
Alessandro Boch
7b97ea3b5f Update Godeps docker/pkg/common => /stringid
- pkg/common was renamed to pkg/stringid
- removed stale dep on libcontainer/utils

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-04-17 21:46:21 -07:00
Alessandro Boch
2ab19b7727 Fix libnetwork_test.go
- It is working on default netns, leaving many
  vethxxx to cleanup after it runs

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-04-17 21:18:55 -07:00
Jana Radhakrishnan
6d1d4375bf Merge pull request #62 from marun/patch-1
Minor language cleanup in ROADMAP.md
2015-04-17 18:38:32 -07:00
Maru
77715cf013 Minor language cleanup in ROADMAP.md 2015-04-17 15:31:21 -07:00
Madhu Venugopal
25eed6b0c2 Merge pull request #61 from tomwilkie/expose_endpoint_id
Expose Endpoint IDs in their public interface.
2015-04-17 13:31:57 -07:00
Tom Wilkie
9d600c0870 Expose Endpoint IDs in their public interface. 2015-04-17 14:55:32 +00:00
Madhu Venugopal
f54087431c Merge pull request #58 from mrjana/cnm
Change all the naked error returns in bridge driver to proper error types
2015-04-16 21:40:41 -07:00
Jana Radhakrishnan
2327269e15 Changed all the naked error returns in bridge driver to proper error
types, except the naked error returns which were just prefixing
strings to previously returned error strings.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-04-17 02:50:22 +00:00
Jana Radhakrishnan
a31f9a65a0 Merge pull request #54 from aboch/pa
Port Allocator as a libnetwork package
2015-04-16 17:41:43 -07:00
Alessandro Boch
64fc8b02e3 Port Allocator as a libnetwork package
DESCRIPTION:
  As part of bringing libnetwork bridge driver features
  in parity with docker/daemon/network/driver/bridge
  features (Issue #46), this commit addresses the
  bridge.RequestPort() API.

  Currenlty docker/api/server.go needs an hold of port
  allocator in order to reserve a transport port which
  will be used by the http server on the host machine,
  so that portallocator does not give out that port when
  queried by portmapper as part of network driver operations.

ISSUE:
  Current implementation in docker is server.go directly
  access portmapper and then portallocator from bridge pkg
  calling bridge.RequestPort(). This also forces that function
  to trigger portmapper initialization (in case bridge init()
  was not executed yet), while portmapper life cycle should
  only be controlled by bridge network driver.
  We cannot mantain this behavior with libnetwrok as this
  violates the modularization of networking code which
  libnetwork is bringing in.

FIX:
  Make portallocator a singleton, now both docker core and
  portmapper code can initialize it and get the only one instance
  (Change in docker core code will happen when docker code
  will migrate to use libnetwork), given it is being used for
  host specific needs.

NOTE:
  Long term fix is having multiple portallocator instances (so
  no more singleton) each capable to be in sync with OS regarding
  current port allocation.
  When this change comes, no change whould be required on portallocator'
  clients side, changes will be confined to portallocator package.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-04-16 17:29:13 -07:00
Madhu Venugopal
cb61545e60 Merge pull request #57 from mrjana/cnm
Makefile fixes to check for failures
2015-04-16 17:14:22 -07:00
Jana Radhakrishnan
55fe669caa - Fixed the makefile which was not checking failures in test code
- Cleaned up the makefile to remove output clutter

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-04-16 19:00:36 +00:00
Madhu Venugopal
2ab4d9ffd8 Merge pull request #55 from mrjana/cnm
Add more test cases to test libnetwork API
2015-04-16 10:13:04 -07:00
Jana Radhakrishnan
a88fc50cbc Fixed a bug in bridge driver where when the bridge already exists
the bridgeInterface.bridgeIPv4 is not getting initialized properly

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-04-16 13:56:52 +00:00
Jana Radhakrishnan
7a8e0742ed - Added more testcases for libnetwork API testing
- Added new error types for all of libnetwork errors

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-04-16 05:15:57 +00:00
Jana Radhakrishnan
ea7f555446 Added a test binary to test README.md code
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-04-16 05:04:31 +00:00
Madhu Venugopal
3841876e17 Merge pull request #52 from dave-tucker/godoc
Fix typos and formatting in docs. Add Godoc badge.
2015-04-15 16:51:05 -07:00
Dave Tucker
58f62a22cd Fix typos and formatting in docs. Add Godoc badge.
Signed-off-by: Dave Tucker <dt@docker.com>
2015-04-16 00:06:02 +01:00
Madhu Venugopal
b5a79b03a6 Merge pull request #51 from mrjana/cnm
Added driver specific config support
2015-04-15 12:01:10 -07:00
Jana Radhakrishnan
29f28ca925 Added driver specific config support
- Added api enhancement to pass driver specific config
  - Refactored simple bridge driver code for driver specific config
  - Added an undocumented option to add non-default bridges without
    manual pre-provisioning to help libnetwork testing
  - Reenabled libnetwork test to do api testing
  - Updated README.md

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-04-15 18:32:07 +00:00
Jana Radhakrishnan
abcebc5108 Merge pull request #48 from nerdalert/gen-netutils
Name/Mac generation and libcontainer dep removal
2015-04-14 15:55:42 -07:00
Brent Salisbury
6adf1defbb Name/Mac generation and libcontainer dep removal
- Modified Mac address generation to match current standard
- Moved GenerateRandomName from libcontainer and removed the dependancy.
- Reduced entropy loop to 3 attempts.

Signed-off-by: Brent Salisbury <brent.salisbury@docker.com>
2015-04-14 18:10:52 -04:00
Madhu Venugopal
ecb204b4be Merge pull request #50 from dave-tucker/badges
Test Coverage and Build Status
2015-04-14 08:47:22 -07:00