Commit Graph

32 Commits

Author SHA1 Message Date
Flavio Crisciani 328948d35a Fix type in error message
Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2018-05-29 08:56:49 -07:00
ZhiPeng Lu 9ba57c93b8 Add warning message for the failure of deleting link device
Signed-off-by: ZhiPeng Lu <lu.zhipeng@zte.com.cn>
2018-03-06 16:37:45 +08:00
Flavio Crisciani 38382fb29b Merge pull request #1752 from aaronlehmann/sprintfs
all: Avoid trivial uses of Sprintf
2017-08-23 15:49:46 -07:00
Derek McGowan 710e0664c4 Update logrus to v1.0.1
Fix case sensitivity issue
Update docker and runc vendors

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-08-07 11:20:47 -07:00
Alessandro Boch ece544627b Adding manager pkg for swarm visible network drivers
- Orchestrator interaction with the network driver is limited
  to at most allocation/release of simple resources. For local scope
  drivers all what is needed is the retrieval of the driver scope.The
  full driver code base does not need to be pulled into the orschestrator.
  This PR introduces a dedicated package in each builtin nw
  driver for that purpose, as it was done for overlay driver.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-05-12 17:16:54 -07:00
Alessandro Boch 254d082cc3 Add ConnectivityScope capability for network drivers along with scope network option
- It specifies whether the network driver can
  provide containers connectivity across hosts.
- As of now, the data scope of the driver was
  being overloaded with this notion.
- The driver scope information is still valid
  and it defines whether the data allocation
  of the network resources can be done globally
  or only locally.
- With the scope network option, user can now
  force a network as swarm scoped
  regardless of the driver data scope.
- In case the network is configured as swarm scoped,
  and the network driver is multihost capable,
  a network DB instance will be launched for it.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-05-12 17:16:34 -07:00
Aaron Lehmann cc0b7e6aad all: Avoid trivial uses of Sprintf
Use the string concatenation operator instead of using Sprintf for
simple string concatenation. This is usually easier to read, and allows
the compiler to detect problems with the type or number of operands,
which would be runtime errors with Sprintf.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-05-09 16:07:09 -07:00
Santhosh Manohar bfab379411 swarm mode network inspect should provide cluser-wide task details
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2017-03-10 19:12:00 -08:00
Madhu Venugopal 1b28c5e01d Internal interface to differentiate built-in drivers from remote
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-12-19 05:17:42 -08:00
Lei Jitang 433e3dfe98 Remove driver endpoints on network deleting
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-10-14 10:05:20 +08:00
Anusha Ragunathan 5c77ba43e2 Update plugingetter import path.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-10-07 12:00:57 -07:00
Anusha Ragunathan 003e04775b Make libnetwork understand pluginv2.
As part of daemon init, network and ipam drivers are passed a
pluginstore object that implements the plugin/getter interface. Use this
interface methods in libnetwork to interact with network plugins. This
interface provides the new and improved pluginv2 functionality and falls
back to pluginv1 (legacy) if necessary.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-09-27 15:29:10 -07:00
Jana Radhakrishnan 8a225de00d Merge pull request #1205 from allencloud/fix-typos
use grep to find a/an misuse
2016-08-01 09:49:31 -07:00
Lei Jitang 744d5332bd ipvlan: remove endpoint from network on deleting endpoint
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-07-19 00:06:46 -04:00
Alessandro Boch 46f525c7d6 Overlay driver to cleanup stale endpoints
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-07-13 10:56:57 -07:00
Alessandro Boch 8ca4ed0c68 IPvlan and macvlan driver to persist endpoints
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-06-13 23:48:00 -07:00
Alessandro Boch 6d3fa9e0f2 Migrate libnetwork to use netlink.Handle
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-06-08 21:05:36 -07:00
allencloud 9f415d0cdb use grep to find a/an misuse
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-06-03 16:35:33 +08:00
Jana Radhakrishnan 6fb69f0816 Add driver api enhancements for gossip
With the introduction of a driver generic gossip in libnetwork it is not
necessary for drivers to run their own gossip protocol (like what
overlay driver is doing currently) but instead rely on the gossip
instance run centrally in libnetwork. In order to achieve this, certain
enhancements to driver api are needed. This api aims to provide these
enhancements.

The new api provides a way for drivers to register interest on table
names of their choice by returning a list of table names of interest as
a response to CreateNetwork. By doing that they will get notified if a
CRUD operation happened on the tables of their interest, via the newly
added EventNotify call.

Drivers themselves can add entries to any table during a Join call by
invoking AddTableEntry method any number of times during the Join
call. These entries lifetime is the same as the endpoint itself. As soon
as the container leaves the endpoint, those entries added by driver
during that endpoint's Join call will be automatically removed by
libnetwork. This action may trigger notification of such deletion to all
driver instances in the cluster who have registered interest in that
table's notification.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-04-18 19:55:39 -07:00
Alessandro Boch 216def1e1b Merge pull request #1120 from mrjana/store
Remove kvstore backend deps from datastore package
2016-04-15 15:50:46 -07:00
Jana Radhakrishnan 89e72d8888 Remove kvstore deps from datastore package
Currently datastore has dependencies on various kv backends.
This is undesirable if datastore had to be used as a backend
agnostic store management package with it's cache layer. This
PR aims to achieve that.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-04-15 15:36:44 -07:00
Jana Radhakrishnan c0162f53a6 Add overlay manager driver
Because overlay is a builtin driver and global allocation of overlay
resources is probably going to happen in a different node (a single
node) and the actual plumbing of the network is probably going to happen
in all nodes, it makes sense to split the functionality of allocation
into two different packages. The central component(this package) only
implements the NetworkAllocate/Free apis while the distributed
component(the existing overlay driver) implements the rest of the driver
api. This way we can reduce the memory footprint overall.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-04-14 10:37:42 -07:00
Jana Radhakrishnan b6d5c12ea2 Add NetworkAllocate/Free to driver api
Added NetworkAllocate and NetworkFree apis to the list of
driver apis. The intention of the api is to provide a
centralized way of allocating and freeing network resources
for a network which is cross-host.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-04-11 16:38:22 -07:00
Brent Salisbury 2b2d011899 Reject a null v4 IPAM slice in exp vlan drivers
Issue #1018

Signed-off-by: Brent Salisbury <brent@docker.com>
2016-03-13 00:42:00 -05:00
Brent Salisbury dda75448c3 Removed experimental drivers modprobe check
- Kernel requirements are checked w/o modprobe now

Signed-off-by: Brent Salisbury <brent@docker.com>
2016-03-11 17:00:36 -05:00
Brent Salisbury fcf79b55ff Bumped ipvlan kernel version to >= 4.2
- ipvlan l2 mode is buggy in < 4.2

Signed-off-by: Brent Salisbury <brent@docker.com>
2016-03-11 14:28:32 -05:00
Madhu Venugopal 60bd944921 ipvlan slaves must inherit the mac-address from parent
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-03-10 18:05:45 -08:00
Madhu Venugopal 64edd40fcc Use osl.InitOSContext appropriately
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-03-10 16:30:10 -08:00
Brent Salisbury af75e8a624 Added kernel version checks for macvlan/ipvlan
ipvlan >= 4.0.0 due to early instability
macvlan >= 3.9

Signed-off-by: Brent Salisbury <brent@docker.com>
2016-03-10 17:09:48 -05:00
Madhu Venugopal fe10aae30b Adding the missing ExternalConnectivity driver methods
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-03-09 19:35:44 -08:00
Madhu Venugopal ed9601e4c6 Make macvlan and ipvlan drivers as experimental
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-03-09 19:43:20 -05:00
Brent Salisbury ea30113303 Added macvlan and ipvlan drivers
- Notes at: https://gist.github.com/nerdalert/c0363c15d20986633fda

Signed-off-by: Brent Salisbury <brent@docker.com>
2016-03-02 06:22:36 -05:00