Commit Graph

15 Commits

Author SHA1 Message Date
Vincent Demeester 06d471d186 Migrate to gotest.tools :)
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-07-06 11:01:37 -07:00
Chris Telfer 40b55d2336 Remove race condition from ovnmanager
This one is probably not critical.  The worst that seems like could
happen would be if 2 deletes occur at the same time (one of which
should be an error):
  1. network gets read from the map by delete-1
  2. network gets read from the map by delete-2
  3. delete-1 releases the network VNI
  4. network create arrives at the driver and allocates the now free VNI
  5. delete-2 releases the network VNI (error: it's been reallocated!)
  6. both networks remove the VNI from the map

Part 6 could also become an issue if there were a simultaneous create
for the network at the same time.  This leads to the modification of
the NewNetwork() method which now checks for an existing network before
adding it to the map.

Signed-off-by: Chris Telfer <ctelfer@docker.com>
2018-05-01 17:41:42 -04:00
Abhinandan Prativadi 3d44975995 Adding a unit case to verify rollover
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
2017-10-03 12:15:34 -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 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
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
Madhu Venugopal 5217602776 Create vxlan-id space from 0 instead of starting from 1
With the introduction of GetIDInRange function in IDM and using it in
ovmanager, the idm.New was modified to start from 1. But that causes
issues when the network is removed which results in releasing the
vxlan-id from IDM. With the offset of 1, the Release call incorrectly
releases a bit which could be in use by another network and this results
in the infamous "error creating vxlan interface: file exists" errors
when another network is created with this freed bit.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-11-25 13:02:03 -08:00
Madhu Venugopal 1066f9ed5c IDM need not be bound by default vxlan-id start index
This will allow users to use the full spectrum of vxlan-ids

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-11-09 14:42:54 -08:00
Madhu Venugopal 3e11ddc4d9 Change vxlan-id start-idx to 4096
To make it consistent with windows and linux workers

Signed-off-by: Madhu Venugopal <madhu@docker.com>

Fixed build breaks

Signed-off-by: msabansal <sabansal@microsoft.com>
2016-11-03 16:50:15 -07:00
Jana Radhakrishnan de766cc7e6 ovmanager: Error out on vxlan id alloc failure
Currently ovmanager simply logs an error when there is a vni allocation
failure. Instead it should error out and free all the previously
allocated vnis

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-06-28 13:46:22 -07:00
Jana Radhakrishnan d3b8412ac6 Update ovmanager to support maximum vni
To support maximum possible overlay networks in swarm mode.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-06-24 16:41:53 -07:00
Madhu Venugopal a2cc703dae Overlay driver's NetworkAllocate method must honor driver options
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-06-08 02:40:28 -07: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
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