Commit Graph

512 Commits

Author SHA1 Message Date
Hongjiang Zhang 027fc3483b
Add bridge and driver code for FreeBSD specifically 2017-08-14 19:32:21 -07:00
Madhu Venugopal 2719c60fbd Merge pull request #1902 from fcrisciani/fix-peerdelete
PeerDbDelete was passing the wrong field
2017-08-11 16:47:58 -07:00
Flavio Crisciani de9a397ae2
PeerDbDelete was passing the wrong field
The peerDbDelete was passing the wrong field to the underlay
Delete operation causing the mac entry to not being deleted
from the bridge on the overlay. This caused connectivity issue
when a container that before was remote was now scheduled
on the local node. The entry was such:
bridge fdb show | grep -i 02:42:0a:01:00:02
02:42:0a:01:00:02 dev vxlan0 master br0
02:42:0a:01:00:02 dev vxlan0 dst 172.31.14.63 link-netnsid 0 self permanent
That was still pointing to a remove node

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-08-11 16:19:59 -07:00
Derek McGowan 43f00b74d7 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
Flavio Crisciani 37502aca3c
PeerInit for the sandbox init
Move the sandbox init logic into the go routine that handles
peer operations.
This is to avoid deadlocks in the use of the pMap.Lock for the
network

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-08-05 12:07:31 -07:00
Flavio Crisciani 0a9aaf80ce
Funnel peerAdd and peerDelete in a channel
Remove the need for the wait group and avoid new
locks
Added utility to print the method name and the caller name

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-08-05 12:07:31 -07:00
Flavio Crisciani 8d6355b5c2
Revert "Avoid peerUpdate logic in swarm mode"
This reverts commit de61c2f25d.

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-08-05 12:07:16 -07:00
Flavio Crisciani de61c2f25d
Avoid peerUpdate logic in swarm mode
Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-08-02 15:29:12 -07:00
Flavio Crisciani df7b47ecc1
Revert "Funnel peerAdd and peerDelete in a channel"
This reverts commit 99290ab252.

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-08-02 15:29:05 -07:00
Flavio Crisciani 99290ab252
Funnel peerAdd and peerDelete in a channel
Remove the need for the wait group and avoid new
locks
Added utility to print the method name and the caller name

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-07-31 09:15:55 -07:00
Madhu Venugopal 17a2d6d589 Merge pull request #1842 from sanimej/arp
Attempt neighbor entry reprogramming on L3 miss
2017-07-28 00:27:58 -07:00
Flavio Crisciani 73ebaefe9c
Avoid flakiness of TestLinkContainers
Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-07-21 13:54:19 -07:00
Santhosh Manohar 48f0c28514 When the gc_thresh3 value is reached kenel might remove existing
neighbor entries. On an l3 miss try to reprogram the neighbor entry
if the peer is valid. Its a best effort attempt because if the arp
table is still at gc_thresh3 value, addition will fail.

Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2017-07-13 17:01:30 -07:00
Madhu Venugopal 26addf43a5 Merge pull request #1755 from msabansal/msabansal/ics
Changes to support ICS network on windows
2017-07-07 18:28:13 +05:30
Sandeep Bansal 28b86bdba3 Fixes docker daemon not restarting after endpoint leak on windows with transaprent network
Signed-off-by: Sandeep Bansal <sabansal@microsoft.com>
2017-06-15 13:27:48 -07:00
Flavio Crisciani 4994c597ce
Fixed code issues
Fixed issues highlighted by the new checks

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-06-12 11:31:35 -07:00
Flavio Crisciani 9d298aaeb8
Fix OS tweaks call
The feature was not getting properly triggered, move it as
first operation in the configure

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-06-06 20:30:41 -07:00
Flavio Crisciani 65e0999de4
Fix leak of watchMiss goroutine
The netlink socket that was used to monitor the L2
miss was never being closed. The watchMiss goroutine
spawned was never returning. This was causing goroutine
leak in case of createNetwork/destroyNetwork

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-06-06 09:24:21 -07:00
Madhu Venugopal eed0fe817e Merge pull request #1781 from fcrisciani/vxlan-issue
Removed printfs
2017-06-05 19:24:41 -07:00
Madhu Venugopal 0ebcef1107 Merge pull request #1792 from sanimej/mac2
Remove dynamic mac entry from fdb on endpoint deletion
2017-06-05 16:30:08 -07:00
Flavio Crisciani b23cdc31d8 Set kernel specific config on linux
On linux systems bump up gc_thresholds so to lower the
probability of running with neighbor table overflow issues

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-06-02 21:00:56 -07:00
Santhosh Manohar ae6824ea64 Remove dynamic mac entry from fdb on endpoint deletion
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2017-06-01 12:20:46 -07:00
Flavio Crisciani a88528e9c3
Removed printfs
Changed some prints into proper logging, also
was missing the \n at the end

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-05-26 14:13:26 -07:00
Sandeep Bansal a35f24ae0b Changes to support ICS network on windows
Signed-off-by: Sandeep Bansal <sabansal@microsoft.com>
2017-05-18 13:45:38 -07:00
Santhosh Manohar b2bc1a6848 Merge pull request #1675 from wenjianhn/forward-top
Add a filter chain to allow persistent rules
2017-05-16 22:47:59 -07:00
Sandeep Bansal 081f160bdc Added persistence to windows driver so that cleanup happens properly
Signed-off-by: Sandeep Bansal <sabansal@microsoft.com>
2017-05-16 14:06:43 -07:00
Jacob Wen 0067b3a8ec Add a filter chain to allow persistent rules
Allow users to configure firewall policies in a way that persists
docker operations/restarts. Docker will not delete or modify any
pre-existing rules from the DOCKER-USER filter chain. This allows
the user to create in advance any rules required to further
restrict access from/to the containers.

Fixes docker/docker#29184
Fixes docker/docker#23987
Related to docker/docker#24848

Signed-off-by: Jacob Wen <jian.w.wen@oracle.com>
2017-05-16 10:24:56 +08:00
Alessandro Boch 755b46861f 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 596122e05e 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
Flavio Crisciani ac1e2ea6b8 Flush container flows in conntrack (Bug #8795)
Flush all the endpoint flows when the external
connectivity is removed.
This will prevent issues where if there is a flow
in conntrack this will have precedence and will
let the packet skip the POSTROUTING chain.

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-04-07 18:30:45 -07:00
Santhosh Manohar 16255b0268 Always program the kernel state if triggered by l2 or l3 miss
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2017-03-16 18:12:52 -07:00
Santhosh Manohar af9957a94c Handle kernel's l2miss notification in the overlay driver
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2017-03-16 12:17:19 -07:00
Madhu Venugopal af59385de0 Merge pull request #1667 from wnagele/master
Support for com.docker.network.bridge.container_interface_prefix label
2017-03-13 07:46:56 -07:00
Madhu Venugopal 4610dd67c7 Merge pull request #1354 from aboch/pol
Few changes in encryption overlay
2017-03-11 18:21:55 -08:00
Alessandro Boch 335e32f1d7 Clear encryption states when joining cluster
- Use the request id for labelling our SAs

Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-03-11 15:52:39 -08:00
Santhosh Manohar 4693eab00d 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
Santhosh Manohar 1dbfb17775 Merge pull request #961 from JrCs/fix-iptables-order
Fix bad order of iptables filter rules
2017-03-05 20:28:22 -08:00
Wolfgang Nagele 40bae11aa7 Support for com.docker.network.bridge.container_interface_prefix label
Signed-off-by: Wolfgang Nagele <mail@wnagele.com>
2017-03-01 03:09:45 +01:00
Santhosh Manohar 530e1d972e Merge pull request #1658 from aboch/iptlck
Serialize non-atomic jump rule programming in bridge
2017-02-22 11:04:37 -08:00
Alessandro Boch fe741120db Serialize non-atomic jump rule programming in bridge
Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-02-22 08:35:26 -08:00
Alessandro Boch d9fae4c73d Once a network is encrypted, do not accept clear packets from it
Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-02-18 12:15:54 -08:00
Madhu Venugopal 5537cb4b15 Merge pull request #1636 from msabansal/overlayfix
Cleaning up windows overlay network driver code and making it rely on HNS network information
2017-02-14 11:03:07 -08:00
Madhu Venugopal 14f6eed900 Merge pull request #1644 from sanimej/self
Update the local VTEP in peerdb on receiving self discovery
2017-02-10 22:27:10 -08:00
Alessandro Boch b1fdb14edf Fix bug in datapath key rotation in 1-1 NAT case
- It was not using the advertise IP to construct the SPI

Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-02-10 18:33:06 -08:00
Santhosh Manohar 5f11f5289c Update the local VTEP in peerdb on receiving self discovery
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2017-02-10 14:24:24 -08:00
msabansal 9e72136cec Clearing up windows overlay driver to just work in swarm mode
Signed-off-by: msabansal <sabansal@microsoft.com>
2017-02-08 11:49:44 -08:00
Alessandro Boch 76ca67184d Merge pull request #1639 from sanimej/serf
Ignore previous serf user events to avoid wrong fdb programming
2017-02-07 12:30:34 -08:00
Madhu Venugopal 6d6d4acf9c Merge pull request #1638 from aboch/ovlk
Do not hold the peer map lock during the peerDBNetworkWalk
2017-02-07 12:22:19 -08:00
Santhosh Manohar e1565882e8 Ignore previous serf user events to avoid wrong fdb programming
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2017-02-07 12:14:23 -08:00
Alessandro Boch 760abd041b Do not hold the peer map lock during the peerDBNetworkWalk
Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-02-07 10:08:05 -08:00