Commit Graph

1129 Commits

Author SHA1 Message Date
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
Jana Radhakrishnan
bd74df7b41 Dnet agent mode support and IT
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-05-05 13:59:00 -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
Andrei Ushakov
e57d2f987d don't add /etc/hosts record if ip is empty (issue #1146)
Signed-off-by: Andrei Ushakov <aushakov@netflix.com>
2016-05-01 11:17:31 -07:00
Alessandro Boch
57a91d9153 Merge pull request #1131 from msabansal/staticip
Static ip support for windows
2016-04-29 12:09:09 -07:00
Jana Radhakrishnan
a18679d145 Merge pull request #1144 from aboch/gw46
Fix bug in osl.SetGatewayIPv6() function
2016-04-29 11:55:12 -07:00
Jana Radhakrishnan
c7bf58cf47 Merge pull request #1143 from aboch/sec
Fix default gw logic for internal networks
2016-04-29 11:53:29 -07:00
Jana Radhakrishnan
b1d422b6b5 Make overlay driver work without a kv store
Currently overlay driver requires a k/v store to allocate a vxlan id and
add an entry in k/v store for network->vxlanIDs binding. But the overlay
driver should be able to work without a k/v store provided libnetwork
can pass along the vxlanIDs needed for the network, rather than the
driver managing it themselves. Modified the driver to work with vxlanIDs
passed down by libnetwork.

Also made changes in the driver to make use of the gossip layer
available in libnetwork if available.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-04-28 17:12:01 -07:00
Alessandro Boch
84682eb59a Fix bug in osl.SetGatewayIPv6() function
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-04-28 12:49:40 -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
Jana Radhakrishnan
c6f278fc3f Merge pull request #1134 from aboch/slr
Fix cross compilation issues
2016-04-28 11:39:30 -07:00
Jana Radhakrishnan
060aa49a70 Fix gossip network event overwriting self
When a node joins a network it sends out a gossip event before it
updates it's own in-memory state. This can create a race where the node
gets the event back from a remote node before we update in-memory state
and we treat that as latest state. To avoid this race, always generate
the gossip after updating local state.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-04-25 09:47:36 -07:00
Alessandro Boch
24d11b1533 Fix cross compilation issues
- Fix circle-ci-cross target
- Remove unsupported os/arch targets
- Fix dnet build for windows/amd64
- Fix a solaris build breakage

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-04-21 11:20:01 -07:00
Amit Krishnan
f09dae40f7 uprev docker/docker, dbus to v4.0.0, boltdb to v1.2.0 to vendor dependencies required for build clean on Solaris
Signed-off-by: Amit Krishnan <krish.amit@gmail.com>
2016-04-20 16:08:15 -07:00
msabansal
43a2b083e8 Static ip support for windows
Signed-off-by: msabansal <sabansal@microsoft.com>
2016-04-20 15:44:32 -07:00
Jana Radhakrishnan
6fb69f0816 Add driver api enhancements for gossip
With the introduction of a driver generic gossip in libnetwork it is not
necessary for drivers to run their own gossip protocol (like what
overlay driver is doing currently) but instead rely on the gossip
instance run centrally in libnetwork. In order to achieve this, certain
enhancements to driver api are needed. This api aims to provide these
enhancements.

The new api provides a way for drivers to register interest on table
names of their choice by returning a list of table names of interest as
a response to CreateNetwork. By doing that they will get notified if a
CRUD operation happened on the tables of their interest, via the newly
added EventNotify call.

Drivers themselves can add entries to any table during a Join call by
invoking AddTableEntry method any number of times during the Join
call. These entries lifetime is the same as the endpoint itself. As soon
as the container leaves the endpoint, those entries added by driver
during that endpoint's Join call will be automatically removed by
libnetwork. This action may trigger notification of such deletion to all
driver instances in the cluster who have registered interest in that
table's notification.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-04-18 19:55:39 -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
4d59574cb3 Merge pull request #1125 from sanimej/bugs
Fix a panic in handling forwarded queries
2016-04-22 08:57:32 -07:00
Alessandro Boch
23d46777a8 Merge pull request #1115 from sanimej/thread
Move the iptables setup for embedded DNS into a reexec process
2016-04-21 17:28:56 -07:00
Santhosh Manohar
6a96717344 Fix a panic in handling forwarded queries
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-04-16 17:20:59 -07:00
Santhosh Manohar
61510dc222 Move the iptables setup for embedded DNS into a reexec process
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-04-15 23:37:20 -07:00
Alessandro Boch
04f5343139 Make o/p of ipam DumpDatabase() consistent
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-04-15 17:34:48 -07:00
Jana Radhakrishnan
716af1c1ee Need boltdb Register only in tests
Fixing an earlier commit which needlessly registered
boltdb in allocator.go while it is needed only for tests.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-04-15 16:34:09 -07:00
Alessandro Boch
52a35304e0 Merge pull request #1121 from mrjana/ipam
Fix ipams builtin package for darwin
2016-04-15 15:51:01 -07:00
Alessandro Boch
216def1e1b Merge pull request #1120 from mrjana/store
Remove kvstore backend deps from datastore package
2016-04-15 15:50:46 -07:00
Jana Radhakrishnan
89e72d8888 Remove kvstore deps from datastore package
Currently datastore has dependencies on various kv backends.
This is undesirable if datastore had to be used as a backend
agnostic store management package with it's cache layer. This
PR aims to achieve that.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-04-15 15:36:44 -07:00
Jana Radhakrishnan
64a2d2a3a2 Fix ipams builtin package for darwin
Make ipams builtin package work for os x target as ipam
driver developers happen to be using os x as well.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-04-15 14:48:49 -07:00
Jana Radhakrishnan
0eb215c7e6 Update libkv in godeps
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-04-15 14:17:48 -07:00
Jana Radhakrishnan
4289ea637a Make IPAM work even without a backing store
In general the core IPAM and bitseq implementation has
very little assumptions about the presence of a backing
store. But there are a few places where this assumption exists
and this makes it not useful as a simple in-memory allocator.
This PR removes those false assumptions.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-04-15 14:02:30 -07:00
Alessandro Boch
ac7fa8454d Merge pull request #1118 from mrjana/api
Add support to accepting arbitrary network ID
2016-04-15 12:52:16 -07:00
Jana Radhakrishnan
7d7b9f2405 Add support to accepting arbitrary network ID
Currently the libnetwork function `NewNetwork` does not allow
caller to pass a network ID and it is always generated internally.
This is sufficient for engine use. But it doesn't satisfy the needs
of libnetwork being used as an independent library in programs other
than the engine. This enhancement is one of the many needed to
facilitate a generic libnetwork.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-04-15 12:34:21 -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
3c210335cd Merge pull request #1116 from sanimej/ov
Correct the check in l3 miss handling in overlay driver
2016-04-15 11:15:45 -07:00
Alessandro Boch
ccad8f64d3 Merge pull request #1111 from mrjana/ovmanager
Add overlay manager driver
2016-04-15 11:05:54 -07:00
Amit Krishnan
69cf50c305 Enable cross platform build check in circle-ci
Signed-off-by: Amit Krishnan <krish.amit@gmail.com>
2016-04-14 15:01:56 -07:00
Amit Krishnan
c7684b5ff7 Get libnetwork to build on Solaris
Signed-off-by: Amit Krishnan <krish.amit@gmail.com>
2016-04-14 14:03:50 -07:00
Jana Radhakrishnan
c0162f53a6 Add overlay manager driver
Because overlay is a builtin driver and global allocation of overlay
resources is probably going to happen in a different node (a single
node) and the actual plumbing of the network is probably going to happen
in all nodes, it makes sense to split the functionality of allocation
into two different packages. The central component(this package) only
implements the NetworkAllocate/Free apis while the distributed
component(the existing overlay driver) implements the rest of the driver
api. This way we can reduce the memory footprint overall.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-04-14 10:37:42 -07:00
Chun Chen
2a60c9f3d4 Merge pull request #1105 from bearice/patch-1
typo fix
2016-04-14 17:11:45 +08:00
Chun Chen
6bf4b4aedf Merge pull request #1109 from aboch/ovt
Overlay driver to check for chain presence
2016-04-14 11:23:07 +08:00
Bearice Ren
e82b92182f typo fix
Signed-off-by: Bearice Ren <bearice@gmail.com>
2016-04-14 11:12:35 +08:00
Alessandro Boch
b8134d571b Merge pull request #1045 from darrenstahlmsft/grammarFix
Change 'an user' to 'a user'
2016-04-13 10:54:40 -07:00
Alessandro Boch
cf65861f59 Overlay driver to check for chain presence
- When creating and programming the global overlay chain,
  gracefully handle the case where the chain already exists.
  Today the driver logs an Error and does not attempt to insert
  the return rule if the chain is already present.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-04-13 10:47:42 -07:00
Santhosh Manohar
39bc023caf Correct the check in l3 miss handling in overlay driver
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-04-13 10:06:45 -07:00
Chun Chen
83d8a3527a Fix broken CI because of newly introduced NetworkAllocate/NetworkFree api
Signed-off-by: Chun Chen <ramichen@tencent.com>
2016-04-13 16:04:58 +08:00
Alessandro Boch
21312b85ba Merge pull request #1103 from mrjana/manager
Add NetworkAllocate/Free to driver api
2016-04-12 15:52:09 -07:00
Alessandro Boch
7efc9e9a20 Merge pull request #1060 from LK4D4/fix_bitseq_races
bitseq: fix races
2016-04-12 15:30:07 -07:00
Alessandro Boch
bda53a31f4 Merge pull request #1093 from mrjana/drvreg
Create driver registry package
2016-04-12 15:26:37 -07:00
Madhu Venugopal
292ea3fe43 Merge pull request #1061 from darrenstahlmsft/WindowsNetworkQos
Added maximum egress bandwidth qos for Windows
2016-04-12 04:02:53 -07:00