Commit Graph

138 Commits

Author SHA1 Message Date
Alessandro Boch
d7d88ce37d Make getSvcRecords() more robust
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-06-17 18:51:57 -07:00
Alessandro Boch
9328f1ea1e Refresh special drivers networks if present in store
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-06-14 21:50:58 -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
Chun Chen
dc94557b00 Merge pull request #1202 from vikaschoudhary16/update-addrSpace
Update address-space in ipam-info for remote driver
2016-06-07 11:49:09 +08:00
Madhu Venugopal
9054ac2b48 Provide a way for libnetwork to make use of Agent mode functionalities
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-06-05 18:41:21 -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
vikaschoudhary16
68de30a57c Update address-space in ipam-info for remote driver
Signed-off-by: vikaschoudhary16 <choudharyvikas16@gmail.com>
2016-06-01 13:43:00 +05:30
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
Alessandro Boch
f741ccf444 Merge pull request #1163 from sanimej/srv
Add support for SRV query in embedded DNS
2016-05-20 12:11:45 -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
Alessandro Boch
b82101c4cc Protect cap access in driver()
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-05-15 18:10:50 -07:00
Alessandro Boch
8c2a2ff471 Do not perform the overlap check on user chosen pool
- As it was before

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-05-09 14:54:16 -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
Santhosh Manohar
63cc2ecf78 Merge pull request #1149 from mrjana/agent
Add libnetwork agent mode support
2016-05-05 14:33:35 -07:00
Alessandro Boch
d0f96c5846 Fix cleanup logic in case of ipv6 allocation failure
- When creating a network with both IPv4 and IPv6 subnets,
  if the allocation of the IPv6 pool fails, the already
  reserved IPv4 pool does not get released.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-05-04 16:33:53 -07:00
Jana Radhakrishnan
0580043718 Add libnetwork agent mode support
libnetwork agent mode is a mode where libnetwork can act as a local
agent for network and discovery plumbing alone while the state
management is done elsewhere. This completes the support for making
libnetwork and its associated drivers to be completely independent of a
k/v store(if needed) and work purely based on the state information
passed along by some some external controller or manager. This does not
mean that libnetwork support for decentralized state management via a
k/v store is removed.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-05-02 18:19:32 -07:00
Alessandro Boch
c891a47cb3 Merge pull request #1095 from mrjana/ipam
Remove all netlink/osl deps from ipam/ipamutils
2016-04-15 11:46:47 -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
Jana Radhakrishnan
f539be8a63 Create driver registry package
Currently driver management logic is tightly coupled with
libnetwork package and that makes it very difficult to
modularize it and use it separately. This PR modularizes
the driver management logic by creating a driver registry
package.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-04-09 09:43:43 -07:00
Alessandro Boch
865951c6e8 Persist ipam driver options
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-04-08 08:18:09 -07:00
Madhu Venugopal
22fae3ae2c Merge pull request #870 from sanimej/bugs
Adds AAAA record handling for the embedded DNS
2016-03-20 10:20:53 -07:00
Madhu Venugopal
896196c521 Merge pull request #967 from aboch/i6
Honor enableIPv6 network flag on IP allocation
2016-03-20 10:03:25 -07:00
Evan Hazlett
7ad482ffc7 label support for networks on creation
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-03-18 18:19:08 -04:00
Alessandro Boch
4b9dc647be Honor enableIPv6 network flag on IP allocation
- If the flag is not set, do not query IPAM driver for
  IPv6 pool/addresses even if they are passed

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-03-18 15:18: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
Alessandro Boch
c92a4e9fd6 Avoid network/endpoint count inconsistences
- ... on ungraceful shutdown during network create
- Allow forceful deletion of network
- On network delete, first mark the network for deletion
- On controller creation, first forcely remove any network
  that is marked for deletion.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-03-15 09:09:13 -07:00
Santhosh Manohar
dd48b1c688 If anonymous container has alias names use it for DNS PTR record
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-03-06 10:46:40 -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
Vincent Demeester
421a3ec5d7 Use gofmt with -s instead of goimports
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-02-12 14:07:00 +01:00
Aidan Hobson Sayers
cfb3ce460b Don't allow passing EnableIPv6 as a driver option (a label)
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
2016-01-30 16:01:29 +00:00
Aidan Hobson Sayers
01d2ad412f Expose the enableIPv6 setting
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
2016-01-29 18:31:13 +00: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
315004b575 Cache scope in network object
Its safe to cache the scope value in network object and can be reused
for cleanup operations. The current implementation assume the presence
of driver during cleanup operation. Since a remote driver may not be
present, we should not fail such cleanup operations. Hence make use of
the scope variable from network object.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-01-18 17:54:29 -08: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
Madhu Venugopal
f9e4b40e5e Allow network-scoped alias to be resolved for annonymous endpoint
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-01-13 12:03:12 -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
Jana Radhakrishnan
06ff0a98a0 Merge pull request #859 from mavenugo/globalalias
Global alias support
2016-01-08 12:38:51 -08:00
Madhu Venugopal
2db863e5d7 Global alias support
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-01-08 12:27:15 -08:00
Ryan Belgrave
16ff947fb6 IpamOptions per network not per ipam subnet
Signed-off-by: Ryan Belgrave <rmb1993@gmail.com>
2016-01-07 21:28:54 -05:00
Santhosh Manohar
cf7ed0a717 Embedded DNS server
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-01-07 00:25:26 -08:00
Chun Chen
69fe328789 Add network options to NetworkInfo to display internal network option
Signed-off-by: Chun Chen <ramichen@tencent.com>
2016-01-06 10:03:15 +08:00
Chun Chen
186a32acab Add internal network option
Signed-off-by: Chun Chen <ramichen@tencent.com>
2015-12-22 09:29:39 +08:00
Madhu Venugopal
b464d40ce6 Merge pull request #822 from wenchma/18626-add_IpamInfo_func
Add IpamInfo() function to retrun ipamV4Info and ipamV6Info
2015-12-20 19:55:29 -08:00
Alessandro Boch
29299b73df Allow remote IPAM driver to express capability
- So that a DHCP based plugin can express it needs
  the endpoint MAC address when requested for an IP address.
- In such case libnetwork will allocate one if not already
  provided by user

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-12-17 15:41:47 -08:00
wenchma
294b858f2c Add IpamInfo() function to retrun ipamV4Info and ipamV6Info
Related to docker/docker#18626

Signed-off-by: wenchma <wenchma@cn.ibm.com>
2015-12-16 17:30:21 +08:00
Ryan Belgrave
44f532f16e When assigning an address for an endpoint set preferred address and
options.

When requesting a gateway address send a gateway label in the options.

Signed-off-by: Ryan Belgrave <rmb1993@gmail.com>
2015-12-04 00:00:03 -05:00
Alessandro Boch
dee3acc574 Release address pool before removing the network from store
- On network delete it is better to release the gateway address
  and address pool before removing the network from the datastore,
  given ipam data is dependent on network data.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-12-01 17:53:09 -08:00