1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

20 commits

Author SHA1 Message Date
Jana Radhakrishnan
a226c36b75 Pass down store configs to driver
- Renamed netlabel prefixes to accomodate both global
       and local store configs.
     - Added a `private` marker.
     - Skipping the data store configs for remote driver
       so that external plugins don't get it as there is
       no secure and sane way to coordinate providing
       data store access to external plugins.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-06 17:28:47 -07:00
Jana Radhakrishnan
71e14dd52a Remove always-on watch for networks and endpoints
Always on watching of networks and endpoints can
affect scalability of the cluster beyond a few nodes.
Remove pro active watching and watch only the objects
you are interested in.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-06 14:15:49 -07:00
Alessandro Boch
2aaef377f3 IPAM driver
- Add IPAM cotract and remote IPAM hooks
 - Add ipam registration in controller
 - Have default IPAM follow ipamapi contract

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-10-03 16:18:19 -07:00
Chun Chen
72567c355b Various refactor and fixes for the previous two commits including:
1. Don't save localscope endpoints to localstore for now.
2. Add common function updateToStore/deleteFromStore to store KVObjects.
3. Merge `getNetworksFromGlobalStore` and `getNetworksFromLocalStore`
4. Add `n.isGlobalScoped` before `n.watchEndpoints` in `addNetwork`
5. Fix integration-tests
6. Fix test failure in drivers/remote/driver_test.go
7. Restore network to store if deleteNework failed
2015-09-22 01:29:51 +08:00
Jana Radhakrishnan
d565a4df48 Push driver config during Init
Currently the driver configuration is pushed through a separate
api. This makes driver configuration possible at any arbitrary
time. This unncessarily complicates the driver implementation.
More importantly the driver does not get access to it's
configuration before it can do the handshake with libnetwork.
This make the internal drivers a little bit different to
external plugins which can get their configuration before the handshake
with libnetwork.

This PR attempts to fix that mismatch between internal drivers and
external plugins.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-09-19 08:43:34 -07:00
John Howard
d56c6de9b2 Windows: Enable compile
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-05-26 10:46:21 -07: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
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
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
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
Jana Radhakrishnan
e797f80ad4 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
68ae284db5 Libnetwork refactor for container network model
- Added controller, network, endpoint and sandbox interfaces
    - Created netutils package for miscallaneous network utilities
    - Created driverapi package to break cyclic dependency b/w driver and libnetwork
    - Made libnetwork multithread safe
    - Made bridge driver multithread safe
    - Fixed README.md

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-04-13 21:40:50 +00:00
Jana Radhakrishnan
91589f4948 Merge with docker/libnetwork
Signed-off-by: Jana Radhakrishnan <mrjana@socketplane.io>
2015-03-06 16:11:19 +00:00
Jana Radhakrishnan
2d16187d8c Refactor the drivers interface to get rid of reflect way
Signed-off-by: Jana Radhakrishnan <mrjana@socketplane.io>
2015-03-06 16:00:21 +00:00
Arnaud Porterie
2457d2549f Fix govet warnings
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-03-04 14:56:22 -08:00
Arnaud Porterie
6424c7a875 Remove golint warnings
Fix all golint warnings, mostly by making exported types internal.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-03-04 13:29:28 -08:00
Arnaud Porterie
b9bd3a7dd0 Add network name
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-03-02 10:17:12 -08:00
Arnaud Porterie
8ad4ec910b Generic argument passing to drivers
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-02-20 09:12:29 -08:00
Arnaud Porterie
79ae90940c Generic options model
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-02-19 22:44:51 -08:00
Arnaud Porterie
8ebeb1da5c Rename strategy to driver
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-02-19 17:37:53 -08:00