Commit graph

101 commits

Author SHA1 Message Date
Sebastiaan van Stijn
1aea4c2bbd
Merge pull request #43146 from evol262/fix/ingress-namespace-performance
Apply peformance tuning to new sandboxes also
2022-05-18 18:28:30 +02:00
Ryan Barry
0dd3a2eade Apply performance tuning to new sandboxes also
relates to #35082, moby/libnetwork#2491

Previously, values for expire_quiescent_template, conn_reuse_mode,
and expire_nodest_conn were set only system-wide. Also apply them
for new lb_* and ingress_sbox sandboxes, so they are appropriately
propagated

Signed-off-by: Ryan Barry <rbarry@mirantis.com>
2022-05-17 15:44:49 -04:00
Eng Zer Jun
7873c27cfb
all: replace strings.Replace with strings.ReplaceAll
strings.ReplaceAll(s, old, new) is a wrapper function for
strings.Replace(s, old, new, -1). But strings.ReplaceAll is more
readable and removes the hardcoded -1.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-05-09 19:45:40 +08:00
Eng Zer Jun
c55a4ac779
refactor: move from io/ioutil to io and os package
The io/ioutil package has been deprecated in Go 1.16. This commit
replaces the existing io/ioutil functions with their new definitions in
io and os packages.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2021-08-27 14:56:57 +08:00
Sebastiaan van Stijn
686be57d0a
Update to Go 1.17.0, and gofmt with Go 1.17
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-08-24 23:33:27 +02:00
Sebastiaan van Stijn
427ad30c05
libnetwork: remove unused "testutils" imports
Perhaps the testutils package in the past had an `init()` function to set up
specific things, but it no longer has. so these imports were doing nothing.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-08-18 14:20:37 +02:00
Sebastiaan van Stijn
a384f83e7a
libnetwork: remove CircleCI config and code
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-09 12:31:52 +02:00
Brian Goff
4b981436fe Fixup libnetwork lint errors
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-06-01 23:48:32 +00:00
Brian Goff
00b2c13a1b Fix some windows issues in libnetwork tests
Fix build constraints for linux-only network drivers

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-06-01 23:48:23 +00:00
Brian Goff
a0a473125b Fix libnetwork imports
After moving libnetwork to this repo, we need to update all the import
paths for libnetwork to point to docker/docker/libnetwork instead of
docker/libnetwork.
This change implements that.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-06-01 21:51:23 +00:00
Sebastiaan van Stijn
3e1e9e878c vendor: gotest.tools v3.0.2
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-12 03:22:18 +02:00
akim01
9ced389e6e Improving load balancer performance
Further improving load balancer performance by expiring
connections to servers with weights set to 0.

Signed-off-by: Andrew Kim <taeyeonkim90@gmail.com>
2020-02-14 13:24:06 -08:00
Andrew Kim
8899d916c0 Improving load balancer performance
IPVS module used for swarm load balancer had a performance issue
under a high load situation. conn_reuse_mode=0 sysctl variable can
be set to handle the high load situation by reusing existing
connection entries in the IPVS table.

Under a high load, IPVS module was dropping tcp SYN packets whenever
a port reuse is detected with a connection in TIME_WAIT status forcing
clients to re-initiate tcp connections after request timeout events.
By setting conn_reuse_mode=0, IPVS module avoids special handling of
existing entries in the IPVS connection table.
Along with expire_nodest_conn=1, swarm load balancer can handle
a high load of requests and forward connections to newly joining
backend services.

Signed-off-by: Andrew Kim <taeyeonkim90@gmail.com>
2019-12-16 07:16:40 -08:00
Arko Dasgupta
f79533d720 Revert "Apply load balancer properly"
This reverts commit 9f58c475940fb0c0d4b69de0af7787b62a40481f.
This commit is causing TestCreateParallel to be flaky

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2019-08-15 15:39:46 -07:00
Arko Dasgupta
9a4025d79f Revert "Adjust LockOSThread"
This reverts commit 94af1e5af2.

The reason to revert this is, that TestCreateParallel is
continously failing and breaking the CI

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2019-08-15 14:44:03 -07:00
elangovan sivanandam
5c9a062864 Merge pull request #2243 from fcrisciani/syscalls
Syscalls reduction
2019-07-31 17:57:15 -04:00
Euan Harris
0275b007c6 vet: Fix composite literal uses unkeyed fields warnings
Signed-off-by: Euan Harris <euan.harris@docker.com>
2019-06-26 16:50:56 +01:00
Chris Telfer
9a2464f436 Set east-west load balancing to use direct routing
Modify the loadbalancing for east-west traffic to use direct routing
rather than NAT and update tasks to use direct service return under
linux.  This avoids hiding the source address of the sender and improves
the performance in single-client/single-server tests.

Signed-off-by: Chris Telfer <ctelfer@docker.com>
2018-10-11 14:13:19 -04:00
Yan Zhu
ce46100a27 doc: fix typo
Signed-off-by: Yan Zhu <yanzhu@alauda.io>
2018-09-07 11:48:15 +08:00
Flavio Crisciani
f9442ee314 Apply load balancer properly
The load balancer options have to be applied
inside the load balancer namespace

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2018-07-25 13:51:33 -07:00
Flavio Crisciani
94af1e5af2 Adjust LockOSThread
Go 1.10 fixed the problem related to thread and namespaces.
Details:
2595fe7fb6
In few words there is no more the possibility to have a go routine
running on a thread that is another namespace.
In this commit some cleanup is done and the method SetNamespace is
being removed. This will save tons of setns syscall, that were happening
way too frequently possibily to make sure that each operation was being
done in the host namespace.
I suspect that also all the drivers not running in a different
namespace would be able to drop also the lock of the OS Thread but
will address it in a different commit

Removed useless LockOSThreads around

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2018-07-25 13:51:15 -07:00
Flavio Crisciani
55ad3ef1a4 Fix handling of the resolv.conf
Leverage what is it passed from the daemon
Fix check about the host networking

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2018-07-24 10:18:10 -07:00
Josh Soref
a06f1b2c4e Spelling fixes
* addresses
* assigned
* at least
* attachments
* auxiliary
* available
* cleanup
* communicate
* communications
* configuration
* connection
* connectivity
* destination
* encountered
* endpoint
* example
* existing
* expansion
* expected
* external
* forwarded
* gateway
* implementations
* implemented
* initialize
* internally
* loses
* message
* network
* occurred
* operational
* origin
* overlapping
* reaper
* redirector
* release
* representation
* resolver
* retrieve
* returns
* sanbdox
* sequence
* succesful
* synchronizing
* update
* validates

Signed-off-by: Josh Soref <jsoref@gmail.com>
2018-07-12 12:54:44 -07:00
Flavio Crisciani
0f593ae92b Merge pull request #2146 from ctelfer/fix-overlay-vxlan-races
Fix overlay vxlan races
2018-07-11 10:41:46 -07:00
Santhosh Manohar
5fdfa8c52c Cleanup interfaces properly when vxlan plumbling fails
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
Signed-off-by: Chris Telfer <ctelfer@docker.com>
2018-07-10 10:33:46 -04:00
Flavio Crisciani
38ec34e0e7 Merge pull request #2122 from quadespresso/esc-509
Changed loglevel from error to warning
2018-07-06 16:28:11 -07:00
Jim Carroll
9da8e04c70 Updated handling of disable_ipv6 file
Signed-off-by: Jim Carroll <jim.carroll@docker.com>
2018-07-06 16:42:29 -05:00
Vincent Demeester
06d471d186 Migrate to gotest.tools :)
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-07-06 11:01:37 -07:00
Flavio Crisciani
7fc1795cdf Allows to set generic knobs on the Sandbox
Refactor the ostweaks file to allows a more easy reuse
Add a method on the osl.Sandbox interface to allow setting
knobs on the sandbox

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2018-06-28 16:14:08 -07:00
Chris Telfer
78b684a24a Add ability to alias any interface in a sanbox
New load balancing code will require ability to add aliases to
load-balncer sandboxes.  So this broadens the OSL interface to allow
adding aliases to any interface, along with the facility to get the
loopback interface's name based on the OS.

Signed-off-by: Chris Telfer <ctelfer@docker.com>
2018-06-28 12:08:18 -04:00
Flavio Crisciani
8f1fca3e66 Multistage for build
Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2018-06-19 21:51:11 -07:00
selansen
d28d679080 Enable IPV6 config on Sandbaox creation on live-restore
In sandbox creation we disable IPV6 config. But this causes problem in live-restore case
where all IPV6 configs are wiped out on running container. Hence extra check has been added
take care of this issue.

Signed-off-by: selansen <elango.siva@docker.com>
2017-12-27 23:32:29 -05:00
Sebastiaan van Stijn
276a452f17 Remove Solaris support
Solaris support for Docker will likely not reach completion,
so removing these files as they are not in use and not
maintained.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-10-25 15:33:06 +02:00
Madhu Venugopal
98fb784130 Merge pull request #1964 from pradipd/hotadd
Enable Hotadd support for windows
2017-10-08 12:28:15 -07:00
Madhan Raj Mookkandy
b0888450a9 Enable Hot Add/Remove of Network Endpoints for Windows
Signed-off-by: Madhan Raj Mookkandy <madhanm@microsoft.com>
2017-10-02 22:19:18 -07:00
Flavio Crisciani
181115b350 Addressing code review comments
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
3c1ebfaef9 Add service virtual IP to sandbox's loopback address
Refreshed the PR: https://github.com/docker/libnetwork/pull/1585
Addressed comments suggesting to remove the IPAlias logic not anymore used

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-08-08 16:16:45 -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
Santhosh Manohar
d51ed8a97b Remove the error message on mac delete failure..
Deletion of the dynamic mac is expected to work only if there was active
traffic with that endpoint and a dynamic entry exists. It can also age
out. Hence the mac removal failing is not error. Removing it to make the
debugging easier when parsing the logs.

Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2017-07-28 15:40:21 -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
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
Alessandro Boch
cddead94d2 Do not manage ipv6 for host mode containers
Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-04-07 14:14:26 -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
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
Santhosh Manohar
200410dd18 Lock linux namespace structure when adding neighbors
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2017-03-02 00:04:09 -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
e94edd6d6b 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
f195563a4e Control IPv6 on container's interface
- Disable ipv6 on all interface by default at sandbox creation.
  Enable IPv6 per interface basis if the interface has an IPv6
  address. In case sandbox has an IPv6 interface, also enable
  IPv6 on loopback interface.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-11-22 15:38:24 -08:00