Commit Graph

18 Commits

Author SHA1 Message Date
selansen 56ca280b27 VXLAN port configuration - late review comments update
Some review comments came in very late after merging
	#2282. This PR addresses those review comments.

Signed-off-by: selansen <elango.siva@docker.com>
2018-11-14 13:26:56 -05:00
selansen 077ccabc45 VXLAN UDP Port configuration support
This PR chnages allow user to configure VxLAN UDP
port number. By default we use 4789 port number. But this commit
will allow user to configure port number during swarm init.
VxLAN port can't be modified after swarm init.

Signed-off-by: selansen <elango.siva@docker.com>
2018-11-01 15:20:30 -04: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 763f0fa1da Set a timeout on the netlink handle sockets
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-11-15 12:08:36 -08:00
Alessandro Boch 801bd7b3b2 Allow user to set the overlay network's mtu
- Being a driver specific flag, user needs to
  account for vxlan and, if enabled, ipsec overhead

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-07-23 22:39:29 -07:00
Alessandro Boch 117131c41b Gracefully handle missing xfrm modules
If xfrm modules cannot be loaded:
- Create netlink.Handle only for ROUTE socket
- Reject local join on overlay secure network

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-06-20 17:25:32 -07:00
Madhu Venugopal 0deffeac4b Cleanup any stale overlay bridge with overlapping subnet in hostMode
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-06-10 08:32:31 -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
Jana Radhakrishnan 6e47b07b39 Cleanup vxlan interfaces inside namespace
If a new network request is received for a prticular vni, cleanup the
interface with that vni even if it is inside a namespace. This is done
by collecting vni to namespace data during init and later using it to
delete the interface.

Also fixed a long pending issue of the vxlan interface not getting
destroyed even if the sandbox is destroyed. Fixed by first deleting the
vxlan interface first before destroying the sandbox.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-06-06 01:31:47 -07:00
Alessandro Boch b52748bb26 Vendoring vishvananda/netlink f9bc7a684edbe780a09b87689db6cb1706bf327f
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-05-16 11:08:47 -07:00
Jana Radhakrishnan 6cff09f710 Check existence of network chain before creating
We check for existence of all filter rules in
overlay driver before creating it. We should
also do this for chain creation, because even though
we cleanup network chains when the last container
stops, there is a possibility of a stale network
chain in case of ungraceful restart.

Also cleaned up stale bridges if any exist due to
ungraceful shutdown of daemon.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-12-22 11:22:03 -08:00
Jana Radhakrishnan 66141b879f Cleanup vxlan interface by id before creating
Currently we are cleaning up vxlan interfaces by name
before trying to setup an interface with the same name.
But this doesn't work for properly cleaning up vxlan
interfaces with the same vni, if the interface has a
a different name than the one expected. The fix is to
delete the interface based on vni.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-12-21 14:55:33 -08:00
Jana Radhakrishnan b7d0fefabc Add overlay network support < 3.16 kernels
Add support for overlay networking in older kernels.

Following were done to achieve this:
    + Create the vxlan network in host namespace.
    + This may create conflicts with other private
      networks so check for conflicts and fail a
      join if there is any conflict.
    + Add iptable based filtering to only allow
      subnet bridges in the same network to forward
      traffic while different network bridges will
      not be able to forward b/w each other. Also
      block traffic to overlay network originating
      from the host itself.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-12-17 10:17:03 -08:00
Jana Radhakrishnan bcd996f4c3 Explicitly set namespace for all network operations
Make sure to always explicitly set namespace for all
kernel bound network operations irrespective of whether
the operation is performed in init namespace or a user
defined namespace. This already happens for user defined
netns. But doesn't happen for initial netns that libnetwork
runs in.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-09-01 14:00:58 -07:00
Alessandro Boch fd43ee1323 Introduce Sandbox entity
- Maps 1 to 1 with container's networking stack
- It holds container's specific nw options which
  before were incorrectly owned by Endpoint.
- Sandbox creation no longer coupled with Endpoint Join,
  sandbox and endpoint have now separate lifecycle.
- LeaveAll naturally replaced by Sandbox.Delete
- some pkg and file renaming in order to have clear
  mapping between structure name and entity ("sandbox")
- Revisited hosts and resolv.conf handling
- Removed from JoinInfo interface capability of setting hosts and resolv.conf paths
- Changed etchosts.Build() to first write the search domains and then the nameservers

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-08-27 11:19:02 -07:00
Santhosh Ram Manohar 960639fbb9 Pass the vxlan port in network endian order
Signed-off-by: Santhosh Ram Manohar <santhosh@docker.com>
2015-08-07 14:58:41 -07:00
Dave Tucker 6bba1cd7b1 Use IANA assigned VXLAN port
Fixes #358

Signed-off-by: Dave Tucker <dt@docker.com>
2015-07-03 03:43:02 +01:00
Jana Radhakrishnan 6e4a572529 Overlay driver
This commit brings in the first implementation of
overlay driver which makes use of vxlan tunneling
protocol to create logical networks across multiple
hosts.

This is very much alpha code and should be used for
demo and testing purposes only.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-06-18 15:06:24 -07:00