Commit graph

79 commits

Author SHA1 Message Date
Madhu Venugopal
849712f35d Better error handling in restoring sandbox states
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-07-27 00:55:46 -07:00
Vladislav Kolesnikov
7301999c2a added locks for all other accesses to controller.svcRecords
Signed-off-by: Vladislav Kolesnikov <vkolesnikov@beget.ru>
2016-07-20 19:49:59 +03:00
Vladislav Kolesnikov
1e0c61c3a2 added mutex on read from controller.svcRecords map
Signed-off-by: Vladislav Kolesnikov <vkolesnikov@beget.ru>
2016-07-20 17:28:32 +03:00
Madhu Venugopal
f0292e04b8 Add Virtual-IP of an endpoint as a secondary IP
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-07-12 15:50:42 -07:00
Jana Radhakrishnan
d5ce149555 Do not add loadbalancer to unpopulated sandboxes
When adding a loadbalancer to a sandbox, the sandbox may have a valid
namespace but it might not have populated all the dependent network
resources yet. In that case do not populate that endpoint's loadbalancer
into that sandbox yet. The loadbalancer will be populated into the
sandbox when it is done populating all the dependent network resources.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-06-15 19:58:33 -07:00
Santhosh Manohar
96cc604cf1 Setup external DNS servers after daemon restart with live-restore
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-06-09 20:30:01 -07:00
Lei Jitang
055c5dd496 Add network restore to support docker live restore container
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-06-13 23:48:00 -07:00
Jana Radhakrishnan
8d1adbd665 Properly cleanup ingress sandbox in controller
When ingress sandbox is removed, properly cleanup the reference in the
controller.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-06-10 08:58:19 -07:00
Madhu Venugopal
4c1ed2010b Merge pull request #1228 from aboch/ll
Allow to program Endpoint link-local addresses
2016-06-08 18:17:42 -07:00
Alessandro Boch
da61c5d37f Allow to program Endpoint link-local addresses
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-06-08 15:02:34 -07:00
Jana Radhakrishnan
0f89c9b7bc Add ingress load balancer
Ingress load balancer is achieved via a service sandbox which acts as
the proxy to translate incoming node port requests and mapping that to a
service entry. Once the right service is identified, the same internal
loadbalancer implementation is used to load balance to the right backend
instance.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-06-04 20:38:32 -07:00
allencloud
de588f950d fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-05-30 18:20:52 +08:00
Jana Radhakrishnan
d05adebf30 Add loadbalancer support
This PR adds support for loadbalancing across a group of endpoints that
share the same service configuration as passed in by
`OptionService`. The loadbalancer is implemented using ipvs with just
round robin scheduling supported for now.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-05-26 13:05:58 -07:00
Santhosh Manohar
0051e39750 Add support for SRV query in embedded DNS
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-05-19 00:27:59 -07:00
Jana Radhakrishnan
ffdceda255 Add service support
Add a notion of service in libnetwork so that a group of endpoints
which form a service can be treated as such so that service level
features can be added on top. Initially as part of this PR the support
to assign a name to the said service is added which results in DNS
queries to the service name to return all the IPs of the backing
endpoints so that DNS RR behavior on the service name can be achieved.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-05-05 16:47:05 -07:00
Alessandro Boch
ff2200b397 Fix default gw logic for internal networks
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-04-28 12:04:22 -07:00
Santhosh Manohar
088c3cafb2 Increase concucrrent query limit
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-04-18 19:55:19 -07:00
Jana Radhakrishnan
b0d046a1af Remove all netlink/osl deps from ipam/ipamutils
Currently ipam/ipamutils has a bunch of dependencies
in osl and netlink which makes the ipam/ipamutils harder
to use independently with other applications. This PR
modularizes ipam/ipamutils into a standalone package
with no OS level dependencies.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-04-10 11:05:39 -07:00
Alessandro Boch
a5aeffcb59 Fix when connecting/disconnecting to/from default gw network
- Restoring original behavior where on disconnect
  from overlay network (only connected network), it also
  disconnects from default gw network.
- On sandbox delete, the leave and delete of each
  endpoint is performed, regardless of whether the endpoint
  is the gw network endpoint. This endpoint is already
  automatically removed in endpoint.sbLeave()
- Also do not let internal network dictate container does
  not need external connectivity. Before this fix, if a container
  was connected to an overlay and an internal network, it may not
  get attached to the default gw network.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-04-06 09:29:41 -07:00
Madhu Venugopal
12f04e292f Revert "Do not leave/delete gw endpoint twice"
This reverts commit c957564753 introduced
via #1064.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-04-05 18:55:16 -07:00
Alessandro Boch
c957564753 Do not leave/delete gw endpoint twice
- On sandbox delete, the leave and delete of each
  endpoint is performed, regardless of whether the endpoint
  is the gw network endpoint. This endpoint is already
  automatically removed in endpoint.sbLeave() by
  sb.clearDefaultGW() when the sandbox is marked for
  deletion.
- Also restoring otiginal behavior where on disconnect
  from overlay network (only connected network), it also
  disconnects from default gw network.
- Also do not let internal network dictate container does
  not need external connectivity. Before this fix, if a container
  was connected to an overlay and an internal network, it may not
  get attached to the default gw network.
- needDefaultGw() takes now into account whether the sandbox
  is marked for deletion

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-04-05 11:32:49 -07:00
Alessandro Boch
df975778fc Log time taken to set sandbox key
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-03-28 20:40:51 -07:00
Santhosh Manohar
0c22e1bd07 Avoid V6 queries in docker domain going to external nameservers
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-03-19 03:07:08 -07:00
Santhosh Manohar
2e566e3882 Add AAAA record handling in embedded DNS server
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-03-16 19:00:17 -07:00
Santhosh Manohar
bb3c060954 Merge pull request #810 from aboch/se
Move exposed ports and port bindings from Endpoint to Sandbox
2016-03-06 16:25:57 -08:00
Alessandro Boch
1638fbdf27 Move exposed ports from Endpoint to Sandbox
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-03-06 09:31:26 -08:00
Alessandro Boch
747ea8e52b Merge pull request #974 from sanimej/RR
Embedded DNS server to return multiple A records for enabling DNS Round Robin
2016-03-04 17:12:35 -08:00
Madhu Venugopal
86db344e56 Merge pull request #803 from aboch/pm
Libnetwork to program container interface's MAC
2016-03-03 18:12:08 -08:00
Madhu Venugopal
eef3a6da75 Merge pull request #895 from sanimej/loop
Source external DNS queries from container namespace
2016-03-03 17:27:19 -08:00
Santhosh Manohar
51058eecec Implement DNS RR in the Docker embedded DNS server
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-03-03 09:33:10 -08:00
Madhu Venugopal
093df0b922 Fixed a panic issue in clearNetworkResources
Not sure why govet didnt catch this obvious error

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-03-03 08:25:13 -08:00
Santhosh Manohar
43e3da2f3a Source external DNS queries from container namespace
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-03-03 07:29:32 -08:00
Stefan Weil
13451d9a07 Fix some typos in comments and strings
All of them were found and fixed by codespell.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-03-01 16:45:14 +01:00
Alexander Morozov
0eb01bbbee Fix race in Statistics
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-02-29 09:45:15 -08:00
msabansal
9871032e4d Windows HNS integration
Signed-off-by: msabansal <sabansal@microsoft.com>
2016-02-12 15:01:37 -08:00
Alessandro Boch
83f1107e59 Delete the interface on endpoint delete in overlay
- Attempt the veth delete only after both ends
  are moved into the default network namespace.
  Which is after both driver.Leave() and
  sandbox.clearNetworkResources() are called.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-01-29 16:04:14 -08:00
Madhu Venugopal
7a76968485 expose Endpoints API for a Sandbox
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-01-25 16:23:00 -08:00
Madhu Venugopal
1419d96a01 Reducing the complexity in default gateway service handling
By removing the need to clear the default gateway during sbJoin and
sbLeave to account for other bridge network, the default-gw endpoint
will stay with the container, it will also help retain the container
property.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-01-23 11:10:00 -08:00
Jana Radhakrishnan
bb5c52a659 Merge pull request #888 from sanimej/dns
Embedded DNS server should resolve only in docker network domain
2016-01-21 18:19:36 -08:00
Santhosh Manohar
411bc69949 Embedded DNS server should resolve only in docker network domain
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-01-19 06:47:30 -08:00
Santhosh Manohar
30ef9bcf4a Retain V6 DNS server in resolv.conf; use only V4 servers for fallback
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-01-19 00:06:19 -08:00
Santhosh Manohar
4e25ffc8d9 Loopback IP shouldn't be filtered from resolv.conf in host mode
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-01-18 20:18:44 -08:00
Santhosh Manohar
5f22db217a Enable embedded DNS server on network connect to a user defined network
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-01-18 18:33:36 -08:00
aboch
3e6a42bcdb Merge pull request #880 from mavenugo/ddd
Force delete sandbox during sandboxCleanup
2016-01-19 13:57:53 -05:00
Madhu Venugopal
a7c52918fd Force delete sandbox during sandboxCleanup
Stale sandbox and endpoints are cleaned up during controller init.
Since we reuse the exact same code-path, for sandbox and endpoint
delete, they try to load the plugin and it causes daemon startup
timeouts since the external plugin containers cant be loaded at that
time. Since the cleanup is actually performed for the libnetwork core
states, we can force delete sandbox and endpoint even if the driver is
not loaded.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-01-17 14:47:49 -08:00
Madhu Venugopal
69acfe6332 Merge pull request #863 from wenchma/typo_error
Fixes some typo errors
2016-01-16 12:23:52 -08:00
Santhosh Manohar
05bd52dbb6 Setup embedded DNS server correctly on container restart
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-01-14 10:16:13 -08:00
wenchma
0b07ad6202 Fixes some typo errors
Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
2016-01-13 12:59:24 +08:00
Madhu Venugopal
ec622bf158 Forced endpoint delete
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-01-12 18:50:28 +00:00
Madhu Venugopal
2db863e5d7 Global alias support
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-01-08 12:27:15 -08:00