Commit graph

522 commits

Author SHA1 Message Date
Flavio Crisciani
2bad0fbedf log for miss notification
Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-10-02 11:12:36 -07:00
Flavio Crisciani
3e7b6c9cb0 flush peerdb entries on network delete
peerDB was never being flushed on network delete
leaveing behind stale entries

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-10-02 11:12:35 -07:00
Flavio Crisciani
711d033757 Handle IP reuse in overlay
In case of IP reuse locally there was a race condition
that was leaving the overlay namespace with wrong configuration
causing connectivity issues.
This commit introduces the use of setMatrix to handle the transient
state and make sure that the proper configuration is maintained

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-10-02 11:12:33 -07:00
Flavio Crisciani
729d45379f Fix lint issues
The package updated and now shows new warnings that had to be corrected
to let the CI pass

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-09-20 08:57:02 -07:00
Flavio Crisciani
a0bdc52fd7 Merge pull request #1900 from pradipd/overlay_one_endpoint
Tasks connected to a swarm network will have 1 endpoint on windows RS3.
2017-08-28 09:22:28 -07: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
Brian Goff
663672b8c7 Lock goroutine to OS thread while changing NS
Prevents an issue where the goroutine may jump to a new OS thread during
execution putting it into a mount/network NS that is unexpected.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 6d8617d8757a759d806a3307ca04d4d588c04aed)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-08-16 12:14:56 -04:00
Flavio Crisciani
a15113e012 Remove useless flags on operations
In the peerDelete the updateDB flag was always true
In the peerAdd the updateDB flag was always true except for
the initSandbox case. But now the initSandbox is handled by the
go routing of the peer operations, so we can move that flag
down and remove it from the top level functions

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-08-14 09:20:55 -07:00
Madhu Venugopal
5de16c2168 Merge pull request #1902 from fcrisciani/fix-peerdelete
PeerDbDelete was passing the wrong field
2017-08-11 16:47:58 -07:00
Flavio Crisciani
b7c258cf07 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
Pradip Dhara
0651183f84 gofmt and lint changes.
Signed-off-by: Pradip Dhara <pradipd@microsoft.com>
2017-08-09 15:53:27 -07:00
Pradip Dhara
404a9ffa5a For RS3, tasks connected to a swarm network will have 1 endpoint .
Signed-off-by: Pradip Dhara <pradipd@microsoft.com>
2017-08-09 14:13:59 -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
Flavio Crisciani
2e38c53def 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
5c52ff49e0 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
b8d514432d Revert "Avoid peerUpdate logic in swarm mode"
This reverts commit b65a4ee10e.

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-08-05 12:07:16 -07:00
Flavio Crisciani
b65a4ee10e 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
d261ccb89f Revert "Funnel peerAdd and peerDelete in a channel"
This reverts commit fee89e0490.

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-08-02 15:29:05 -07:00
Flavio Crisciani
fee89e0490 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
7a064d0ec0 Merge pull request #1842 from sanimej/arp
Attempt neighbor entry reprogramming on L3 miss
2017-07-28 00:27:58 -07:00
Flavio Crisciani
daba67d67b Avoid flakiness of TestLinkContainers
Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-07-21 13:54:19 -07:00
Santhosh Manohar
a50e885121 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
d01e1d38c3 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
2d278dece0 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
65860255c6 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
233aa636d7 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
d5c69190d1 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
d65565610f Merge pull request #1781 from fcrisciani/vxlan-issue
Removed printfs
2017-06-05 19:24:41 -07:00
Madhu Venugopal
54d627c69d 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
4abd54d419 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
e49955988a 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
ae9f1f9f04 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
6d7e9ea6b4 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
98447449de 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
f566d6384e 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
c348cebe99 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
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
Flavio Crisciani
3684df4a66 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
9dc694de18 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
83837617b4 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
00f1f12906 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
c85473ad37 Merge pull request #1354 from aboch/pol
Few changes in encryption overlay
2017-03-11 18:21:55 -08:00
Alessandro Boch
9272c89bb7 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
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
Santhosh Manohar
b2430cc299 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
d07e1a02a4 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
8288090b19 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
138c4b2a77 Serialize non-atomic jump rule programming in bridge
Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-02-22 08:35:26 -08:00