Commit graph

2840 commits

Author SHA1 Message Date
Jana Radhakrishnan
4a3c7e1bb5 Changed portallocator New() method to Get()
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-14 21:59:17 +00:00
Jana Radhakrishnan
a76c5e1490 Merge pull request #146 from aboch/jpi
Initial libnetwork rest api
2015-05-14 13:03:47 -07:00
Brent Salisbury
7ae3e91c8d fixing a link in design.md
Signed-off-by: Brent Salisbury <brent.salisbury@docker.com>
2015-05-14 16:02:06 -04:00
Alessandro Boch
9fad1812d9 Initial libnetwork rest api
- Defines and implement http handler for "/networks" URLs
- Addresses part of requirements tracked by Issue #5

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-05-14 12:18:44 -07:00
Madhu Venugopal
ab9dfa2b1e Merge pull request #149 from mrjana/cnm_integ
Update resolvconf and iptables packages
2015-05-12 20:37:54 -07:00
Jana Radhakrishnan
26a5a79374 Update resolvconf and iptables packages from docker
Updated resolvconf and iptables packages based on upstream
changes which we need for libnetwork rebase. There were
docker engine changes based on this so we need this to
be integrated now.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-13 03:29:17 +00:00
Madhu Venugopal
03f29ff11b Merge pull request #148 from mrjana/tcfail
Fixed test case intermittent failure problem and an ipv6 issue
2015-05-12 17:57:32 -07:00
Jana Radhakrishnan
10fafb06eb Fixed an intermittent issue in the libnetwork test
The libnetwork test does not need to run inside a namespace
when inside a container. This results in unpredictable behavior
when the sandbox code unlocks the go routine from the OS thread
while the test code still wants it locked in the OS thread. This
will result in unreachable interfaces when the go routine
migrates to a different OS thread.

Fixed by passing a special test flag which is only set to true
when the test is run inside a container.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-13 00:22:00 +00:00
Jana Radhakrishnan
79556b1ccc Fix issue in ipv6 when a non-default link-local ipv6 address is present.
If the bridge exists and it exists with a different link local ip address
than fe80::1/64 then we waifl to accept that as a valid configuration without
trying to add the default link local ip address. With this fix we always try
to add the default link local address if it doesn't exist.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-12 23:43:06 +00:00
Madhu Venugopal
b9fc99be2c Merge pull request #130 from junxu/master
Simplify the code in the RegisterSubnet method of ipallocator.
2015-05-12 11:42:09 -07:00
Jana Radhakrishnan
d1ce8f01a4 Merge pull request #143 from squaremo/driver_init_not_new
Make driver packages register themselves via DriverCallback
2015-05-11 22:14:51 -07:00
junxu
382fe75607 Simplify the code in the RegisterSubnet method of ipallocator. 2015-05-12 00:44:34 +00:00
Jana Radhakrishnan
ae604975c7 Merge pull request #145 from aboch/master
By ID and By Name query methods to return error
2015-05-11 16:41:12 -07:00
Alessandro Boch
d69e66c894 By ID and By Name query methods to return error
(Requested by docker reviewer on libnetwork integration PR)

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-05-11 16:25:36 -07:00
Madhu Venugopal
c9d0e35daf Merge pull request #144 from squaremo/create_build_image
Create build image with dependencies installed
2015-05-11 13:27:47 -07:00
Michael Bridgen
1cd241686c Create a build image to avoid install-deps every time
Signed-off-by: Michael Bridgen <mikeb@squaremobius.net>
2015-05-11 21:17:12 +01:00
Michael Bridgen
614d82390c Make driver packages register themselves via DriverCallback
In the present code, each driver package provides a `New()` method
which constructs a driver of its type, which is then registered with
the controller.

However, this is not suitable for the `drivers/remote` package, since
it does not provide a (singleton) driver, but a mechanism for drivers
to be added dynamically. As a result, the implementation is oddly
dual-purpose, and a spurious `"remote"` driver is added to the
controller's list of available drivers.

Instead, it is better to provide the registration callback to each
package and let it register its own driver or drivers. That way, the
singleton driver packages can construct one and register it, and the
remote package can hook the callback up with whatever the dynamic
driver mechanism turns out to be.

NB there are some method signature changes; in particular to
controller.New, which can return an error if the built-in driver
packages fail to initialise.

Signed-off-by: Michael Bridgen <mikeb@squaremobius.net>
2015-05-11 19:00:06 +01:00
Madhu Venugopal
7067186b16 Merge pull request #138 from fmzhen/test-dev
Add some tests
2015-05-10 11:08:31 -07:00
Jana Radhakrishnan
3c832fe8d5 Merge pull request #137 from aboch/cks
NewNetwork and CreateEndpoint to validate resource name
2015-05-10 11:06:21 -07:00
Alessandro Boch
1739626f4d NewNetwork and CreateEndpoint to validate resource name
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-05-10 10:59:58 -07:00
Jana Radhakrishnan
5284149bc8 Merge pull request #132 from mavenugo/master
Fixed some convoluted texts in remote.md and fixed a remote driver bug
2015-05-10 10:56:38 -07:00
Jana Radhakrishnan
7aeea5de8d Merge pull request #134 from mavenugo/proxy
Added more test coverage for the portmapper package
2015-05-10 10:55:30 -07:00
Madhu Venugopal
f9ef08c30f Merge pull request #140 from mrjana/cnm_integ
Make endpoint Join and Leave multi-thread safe
2015-05-10 10:53:43 -07:00
Jana Radhakrishnan
7f7d9abd87 Make endpoint Join and Leave multi-thread safe
- Refactored the Join/Leave code so they are synchronized across multiple go-routines
    - Added parallel test coverage to test mult-thread access to Join/Leave
    - Updated sandbox code to revert back to caller namespace when removing interfaces
    - Changed the netns path to /var/run/netns so the cleanup is simpler on machine
      reboot scenario

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-10 17:36:04 +00:00
Madhu Venugopal
2fc4f3154f Added more test coverage for portmapper package.
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-10 16:53:56 +00:00
Jana Radhakrishnan
e745f03301 Merge pull request #135 from mavenugo/epleave
Cleaning up the ActiveContainer test properly
2015-05-08 22:37:01 -07:00
Mingzhen Feng
0db03ebaa3 Add some tests
Signed-off-by: Mingzhen Feng <fmzhen@zju.edu.cn>
2015-05-08 15:00:59 +08:00
Madhu Venugopal
fd04ef2d00 Cleaning up the Endpoint Joins with proper defered Leave
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-07 14:09:16 -07:00
Madhu Venugopal
27d34d67ab Fixed some convoluted texts in remote.md and fixed a remote driver bug
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-07 11:55:46 -07:00
Madhu Venugopal
3978219c14 Merge pull request #109 from liubin/liubin/fixtypos
fix some typos
2015-05-07 06:34:01 -07:00
bin liu
e1003fb078 fix some typos
Signed-off-by: bin liu <liubin0329@gmail.com>
2015-05-07 09:22:06 +00:00
Jana Radhakrishnan
03c18818ed Merge pull request #128 from kunalkushwaha/master
Small typo fixed
2015-05-06 22:02:53 -07:00
Jana Radhakrishnan
95058e9992 Merge pull request #127 from mavenugo/remote
Remote Driver Registration
2015-05-06 22:02:19 -07:00
Madhu Venugopal
904a313396 Remote Driver Registration
This commits brings in a functionality for remote drivers to register
with LibNetwork. The Built-In remote driver is responsible for the
actual "remote" plugin to be made available.

Having such a mechanism makes libnetwork core not dependent on any
external plugin mechanism and also the Libnetwork NB apis are free of
Driver interface.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-06 21:45:30 -07:00
Madhu Venugopal
0d45fb66b3 Added remote driver design doc
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-06 20:16:43 -07:00
unknown
df3cde525a Small typo fixed
Signed-off-by: Kunal Kushwaha <kunal.kushwaha@gmail.com>
2015-05-07 11:11:34 +09:00
Madhu Venugopal
7d99fcdadf Merge pull request #126 from mrjana/cnm_integ
Brought in iptables package from docker
2015-05-06 17:08:58 -07:00
Jana Radhakrishnan
067e8977d5 Updated godeps
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-06 23:52:50 +00:00
Jana Radhakrishnan
9714bcac87 Brought in iptables package into libnetwork.
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-06 23:52:50 +00:00
Jana Radhakrishnan
25102c6e4d Merge pull request #123 from mavenugo/docs
Updated Design, Readme and Roadmap Documents
2015-05-06 15:45:51 -07:00
Madhu Venugopal
b00882ef9f Merge pull request #125 from mrjana/cnm_integ
Brought in etchosts and resolvconf packages from docker
2015-05-06 15:43:34 -07:00
Jana Radhakrishnan
d10b8aca74 Updated Godeps
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-06 22:26:58 +00:00
Jana Radhakrishnan
9a5217b514 Copied etchosts and resolvconf packages to libnetwork.
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-06 22:26:58 +00:00
Jana Radhakrishnan
15f9768ec1 Merge pull request #124 from mavenugo/endpoint
Handled endpoint delete with active containers attached to it
2015-05-06 15:18:45 -07:00
Madhu Venugopal
142825b2f3 Updated Design Document
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-06 13:38:16 -07:00
Madhu Venugopal
570a76384a Handled endpoint delete with active containers attached to it
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-06 13:04:39 -07:00
Dave Tucker
4f7eb502bf Add design documentation
This is an intial pass at the design docs.
Hopefully, we can merge this and then start accepting PRs to improve it!

Signed-off-by: Dave Tucker <dt@docker.com>
2015-05-06 11:53:55 -07:00
Madhu Venugopal
db8100743b Merge pull request #122 from mrjana/cnm_integ
Add enable ipv6  network configuration
2015-05-06 11:02:00 -07:00
Jana Radhakrishnan
3919b126a9 Added support for network specific enable ipv6 label
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-06 17:43:34 +00:00
Jana Radhakrishnan
94a9f12280 Moved most of the driver configuration to network configuration.
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-06 17:43:24 +00:00