Commit graph

2930 commits

Author SHA1 Message Date
Arko Dasgupta
429f9b64fa Merge pull request #2511 from SamWhited/bump_dns
Bump the DNS library and revendor
2020-02-25 13:27:59 -08:00
Sam Whited
2a480d515e Bump the DNS library and revendor
Signed-off-by: Sam Whited <sam@samwhited.com>
2020-02-25 15:37:30 -05:00
Sam Whited
9cd3fb6796 Re-vendor with newer vndr
Signed-off-by: Sam Whited <sam@samwhited.com>
2020-02-25 15:37:23 -05:00
Arko Dasgupta
812104ceae Merge pull request #2500 from tklauser/cli-pkg-migrate
Migrate from github.com/codegangsta/cli to github.com/urfave/cli
2020-02-21 15:22:28 -08:00
Arko Dasgupta
cedfa2f7b9 Merge pull request #2419 from lemrouch/2418-fix
Fix internal macvlan network to work in swarm
2020-02-20 16:03:19 -08:00
Pavel Matěja
c7f8bfa001 Fix internal ipvlan network to work in swarm
Using dummy interface allows communication beween containers only if
they are running on the same node in swarm.

Signed-off-by: Pavel Matěja <pavel@verotel.cz>
2020-02-20 19:33:48 +00:00
Pavel Matěja
b0bce9159e Fix internal macvlan network to work in swarm
Using dummy interface allows communication beween containers only if
they are running on the same node in swam.

Signed-off-by: Pavel Matěja <pavel@verotel.cz>
2020-02-20 19:33:48 +00:00
Arko Dasgupta
e320a921ac Merge pull request #2507 from docker/arkodg-update-design-doc
Update design.md
2020-02-20 10:58:16 -08:00
Arko Dasgupta
14fbe41991 Update design.md
The roadmap document was outdated, and removed in #2316, so remove the link from here

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2020-02-18 17:21:39 -08:00
Arko Dasgupta
a6d52f1521 Merge pull request #2491 from ahjumma/master
Improving load balancer performance
2020-02-16 19:31:14 -08:00
Arko Dasgupta
7bb9876f89 Merge pull request #2498 from wawa0210/bump-hcsshim-v0.8.7
Update vendored dependency hcsshim to v0.8.7
2020-02-16 14:30:42 -08:00
Arko Dasgupta
b8b9d67d1a Merge pull request #2454 from arkodg/add-host-ip-snat
Support for com.docker.network.host_ipv4 driver label
2020-02-15 08:32:56 -08:00
Arko Dasgupta
b5b12d8bec Merge pull request #2317 from gsomlo/gls-bridge-inhibit-ipv4
Allow bridge net driver to skip IPv4 configuration of bridge interface
2020-02-14 14:47:24 -08: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
Madhu Venugopal
cb48244350 Merge pull request #2494 from thaJeztah/add_arko_to_maintainers
Add Arko to maintainers
2020-02-06 05:29:59 -08:00
Tobias Klauser
5cc6ffae0c Migrate from github.com/codegangsta/cli to github.com/urfave/cli
The library was moved quite a while ago, adjust the module path. No code
changes.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2020-01-24 11:12:07 +01:00
wawa0210
cc7847ddd2 Update vendored dependency hcsshim to v0.8.7
Signed-off-by: wawa0210 <xiaozhang0210@hotmail.com>
2020-01-11 08:08:53 +00:00
elangovan sivanandam
e2c0d868ab Merge pull request #2380 from liskin/bridge-atomic-hwaddr
bridge: Fix hwaddr set race between us and udev
2019-12-31 19:30:42 -05:00
Sebastiaan van Stijn
6492936018 Add Arko to maintainers
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-12-31 11:04:32 +01: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
Euan Harris
1473794fb5 Merge pull request #2489 from suwang48404/doc
Added document describing libnetwork traffic flow.
2019-12-05 16:51:29 +00:00
Su Wang
c27bb1189d Added document describing libnetwork traffic flow.
Signed-off-by: Su Wang <su.wang@docker.com>
2019-12-05 16:20:57 +00:00
elangovan sivanandam
f55f6f82ed Merge pull request #2445 from kdomanski/ipv6-addr-in-hosts
etchosts: include the container's IPv6 address if available
2019-12-04 13:19:49 -05:00
elangovan sivanandam
9b62a8a675 Merge pull request #2462 from arkodg/fix-key-spi-panic
Fix panic in drivers/overlay/encryption.go
2019-11-15 17:40:09 -05:00
Arko Dasgupta
cd864b50a2 Fix panic in drivers/overlay/encryption.go
Issue - "index out of range" panic in drivers/overlay/encryption.go:539
due to a mismatch in indices between curKeys and spis due to
case where updateKeys might bail out due to an error and
not update the spis

Fix - Reconfigure keys when there is a key update failure

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2019-10-31 12:59:41 -07:00
elangovan sivanandam
aa1016e702 Merge pull request #2472 from thaJeztah/bump_golang_1.12.12
Update Golang 1.12.12 (CVE-2019-17596)
2019-10-22 16:18:16 -04:00
Sebastiaan van Stijn
fdf46323f4 Update Golang 1.12.12 (CVE-2019-17596)
Golang 1.12.12
-------------------------------

full diff: https://github.com/golang/go/compare/go1.12.11...go1.12.12

go1.12.12 (released 2019/10/17) includes fixes to the go command, runtime,
syscall and net packages. See the Go 1.12.12 milestone on our issue tracker for
details.

https://github.com/golang/go/issues?q=milestone%3AGo1.12.12

Golang 1.12.11 (CVE-2019-17596)
-------------------------------

full diff: https://github.com/golang/go/compare/go1.12.10...go1.12.11

go1.12.11 (released 2019/10/17) includes security fixes to the crypto/dsa
package. See the Go 1.12.11 milestone on our issue tracker for details.

https://github.com/golang/go/issues?q=milestone%3AGo1.12.11

    [security] Go 1.13.2 and Go 1.12.11 are released

    Hi gophers,

    We have just released Go 1.13.2 and Go 1.12.11 to address a recently reported
    security issue. We recommend that all affected users update to one of these
    releases (if you're not sure which, choose Go 1.13.2).

    Invalid DSA public keys can cause a panic in dsa.Verify. In particular, using
    crypto/x509.Verify on a crafted X.509 certificate chain can lead to a panic,
    even if the certificates don't chain to a trusted root. The chain can be
    delivered via a crypto/tls connection to a client, or to a server that accepts
    and verifies client certificates. net/http clients can be made to crash by an
    HTTPS server, while net/http servers that accept client certificates will
    recover the panic and are unaffected.

    Moreover, an application might crash invoking
    crypto/x509.(*CertificateRequest).CheckSignature on an X.509 certificate
    request, parsing a golang.org/x/crypto/openpgp Entity, or during a
    golang.org/x/crypto/otr conversation. Finally, a golang.org/x/crypto/ssh client
    can panic due to a malformed host key, while a server could panic if either
    PublicKeyCallback accepts a malformed public key, or if IsUserAuthority accepts
    a certificate with a malformed public key.

    The issue is CVE-2019-17596 and Go issue golang.org/issue/34960.

    Thanks to Daniel Mandragona for discovering and reporting this issue. We'd also
    like to thank regilero for a previous disclosure of CVE-2019-16276.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-20 23:38:03 +02:00
elangovan sivanandam
d6689e849b Merge pull request #2461 from suwang48404/master
Allowed libnetwork caller to set ephemeral port
2019-10-14 23:02:04 -04:00
Su Wang
2c4a868f64 Added API to set ephemeral port allocator range.
Also reduce the allowed port range as the total number of containers
per host is typically less than 1K.

This change helps in scenarios where there are other services on
the same host that uses ephemeral ports in iptables manipulation.

The workflow requires changes in docker engine (
https://github.com/moby/moby/pull/40055) and this change. It
works as follows:

1. user can now specified to docker engine an option
   --published-port-range="50000-60000" as cmdline argument or
   in daemon.json.
2. docker engine read and pass this info to libnetwork via
   config.go:OptionDynamicPortRange.
3. libnetwork uses this range to allocate dynamic port henceforth.
4. --published-port-range can be set either via SIGHUP or
   restart docker engine
5. if --published-port-range is not set by user, a OS specific
   default range is used for dynamic port allocation.
   Linux: 49153-60999, Windows: 60000-65000
6 if --published-port-range is invalid, that is, the range
  given is outside of allowed default range, no change takes place.
  libnetwork will continue to use old/existing port range for
  dynamic port allocation.

Signed-off-by: Su Wang <su.wang@docker.com>
2019-10-11 18:48:07 +00:00
elangovan sivanandam
b9a29b2856 Merge pull request #2466 from arkodg/revert-iptables-docker-user
Revert "Merge pull request #2339 from phyber/iptables-check"
2019-10-11 13:10:48 -04:00
Arko Dasgupta
f042605a42 Revert "Merge pull request #2339 from phyber/iptables-check"
This reverts commit 8d76333719, reversing
changes made to bdd0b7bb40.

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2019-10-11 09:38:19 -07:00
elangovan sivanandam
01f67061b5 Merge pull request #2458 from arkodg/fix-flaky-tests
Fix flaky NetworkDB tests
2019-10-04 16:50:31 -04:00
Arko Dasgupta
34a636bf51 Fix flaky NetworkDB tests
Fixed these tests :

1.TestNetworkDBIslands
Addresses : https://github.com/docker/libnetwork/issues/2402

2.TestNetworkDBCRUDMediumCluster
Addresses : https://github.com/docker/libnetwork/issues/2401

By :

1. Importing gotest.tools/poll to use poll.WaitOn
Above function can be used to check a condition at regular intervals
until a timeout is reached

2. Replacing Sleep with poll.WaitOn

2. Adding closeNetworkDBInstances to close remaining DBs

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2019-10-04 10:17:19 -07:00
elangovan sivanandam
4540e13414 Merge pull request #2459 from arkodg/fix-error-check
Fix Error Check in NewNetwork
2019-10-03 18:34:21 -04:00
Arko Dasgupta
87b082f365 Fix Error Check in NewNetwork
Use types.MaskableError instead of doing a string comparison

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2019-10-03 00:54:45 -07:00
elangovan sivanandam
257e0d4d09 Merge pull request #2443 from Rid/shorten-setkey-id
Shorten controller ID in exec-root to not hit UNIX_PATH_MAX
2019-09-28 18:33:13 -04:00
elangovan sivanandam
f7748b11ca Merge pull request #2444 from kdomanski/verbose-ipv6-cannot-add
log the actual error when failing to add IPv6 route
2019-09-28 18:29:39 -04:00
elangovan sivanandam
e481dc9fad Merge pull request #2449 from espensuenson/bugfix_getnetworkfromstore
Fixed getNetworkFromStore, which returned an incorrect struct
2019-09-28 18:27:21 -04:00
elangovan sivanandam
33e9208a19 Merge pull request #2453 from jdrahos/ipvs_weighted_scheduling_constants-2452
weighted scheduling methods constants for ipvs
2019-09-28 18:19:02 -04:00
Euan Harris
6b13c00a79 Merge pull request #2456 from suwang48404/master
Resolve "bridge fdb show" hang issue
2019-09-27 16:04:10 +01:00
Su Wang
ff27bb0db4 Resolve "bridge fdb show" hang issue
The output of "bridge fdb show" command invoked under a network
namespace is unpredicable. Sometime it returns empty, and sometime
non-stop rolling output. This perhaps is a bug in kernel
and/or iproute2 implementation. To work around, display fdb  for
 each bridge.

Signed-off-by: Su Wang <su.wang@docker.com>
2019-09-26 21:29:22 +00:00
Jakub Drahos
edd44eede9 trigger new CI run
Signed-off-by: Jakub Drahos <jack.drahos@gmail.com>
2019-09-25 10:39:33 -04:00
Grant Millar
beb0c82841 Rerun CI
Signed-off-by: Grant Millar <rid@cylo.io>
2019-09-25 14:37:18 +01:00
Arko Dasgupta
8c8a25d524 Support for com.docker.network.host_ipv4 driver label
This commit allows a user to specify a Host IP via the
com.docker.network.host_ipv4 label which is used as the
Source IP during SNAT for bridge networks .

The use case is for hosts with multiple interfaces and
this label can dictate which IP will be used as Source IP
for North-South traffic

In the absence of this label, MASQUERADE is used which picks the Source IP
based on Next Hop from the Route Table

Addresses: https://github.com/moby/moby/issues/30053

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2019-09-24 22:15:43 -07:00
Jakub Drahos
0a99a5f152 adding the constants to the test file
Signed-off-by: Jakub Drahos <jack.drahos@gmail.com>
2019-09-24 21:42:32 -04:00
jdrahos
4d1db69bcc weighted scheduling methods constants for ipvs
Signed-off-by: Jakub Drahos <jack.drahos@gmail.com>
2019-09-24 21:01:05 -04:00
Espen Suenson
a1ab732711 return immediately on error
Signed-off-by: Espen Suenson <mail@espensuenson.dk>
2019-09-24 10:58:08 +02:00
Euan Harris
141b53c77a Merge pull request #2450 from TheNodi/iptables-policy
Always configure iptables forward policy
2019-09-17 16:38:09 +01:00
elangovan sivanandam
57fdd1f741 Merge pull request #2429 from pradipd/windows-nosubnet
Updating IPAM config with results from HNS create network call.
2019-09-13 11:19:09 -04:00
Leonardo Nodari
7e584c1d69 Configure iptables forward policy when ip forwarding is enabled
Signed-off-by: Leonardo Nodari <me@leonardonodari.it>
2019-09-12 15:47:27 +02:00