Commit graph

791 commits

Author SHA1 Message Date
Madhu Venugopal
f77bdb6589 Merge pull request #594 from mrjana/model
Remove watch on all libnetwork objects
2015-10-06 14:46:48 -07:00
Jana Radhakrishnan
a22ce0938c Add bridge network integration tests
Add a few bridge network integration tests which
specifically deals with multiple bridge networks
and libnetwork restart and persistence

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-06 14:16:26 -07:00
Jana Radhakrishnan
a13f78369f IPAM watch removal and multistore support
Remove the need for watching for IPAM data
structures and add multi store support code and
data reorganization to simplify address space
management.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-06 14:16:06 -07:00
Jana Radhakrishnan
71e14dd52a Remove always-on watch for networks and endpoints
Always on watching of networks and endpoints can
affect scalability of the cluster beyond a few nodes.
Remove pro active watching and watch only the objects
you are interested in.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-06 14:15:49 -07:00
Jana Radhakrishnan
d74384b1d4 Add local store caching support
Add local scope store caching support as
well as do some refactoring to make it datastore
scope aware and manage scope specific config.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-06 14:15:31 -07:00
aboch
f710e690c0 Merge pull request #593 from mavenugo/ipam-fix
ipam must honor preferedIP ahead of random allocation from subPool
2015-10-05 07:42:17 -07:00
Madhu Venugopal
782d9a4618 ipam must honor preferedIP ahead of random allocation from subPool
Currently the default ipam implementation ignores the prefered ip if the
request is made on an existing sub-pool. The priority should be other
way around.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-05 00:40:17 -07:00
Madhu Venugopal
5f21cf3df1 Merge pull request #584 from sanimej/subnets
Support for multiple subnets in a overlay network
2015-10-04 21:09:07 -07:00
aboch
da0a70cc8d Merge pull request #589 from mavenugo/master
Fixed a bug in AuxAddresses handling in libnetwork core
2015-10-04 20:26:53 -07:00
Madhu Venugopal
cc1e49cbbb Fixed a bug in AuxAddresses handling in libnetwork core
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-04 18:59:07 -07:00
Madhu Venugopal
62d05e6fa9 Merge pull request #585 from aboch/ds2
Default IPAM to handle local ds
2015-10-03 23:09:07 -07:00
Alessandro Boch
b061382c5e Default IPAM to handle local ds
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-10-03 22:47:46 -07:00
Jana Radhakrishnan
fa47cb8da2 Merge pull request #583 from aboch/bq
Fix in bitseq.NewHandle()
2015-10-03 21:40:58 -07:00
Alessandro Boch
67b1e3c5f2 Fix in bitseq.NewHandle()
- When creating the handle, write it to store if
  not present. Currently it is written to store
  only on first bit allocation.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-10-03 21:33:05 -07:00
Madhu Venugopal
8dde3b2380 Merge pull request #525 from aboch/am
IPAM driver
2015-10-03 17:35:42 -07:00
Madhu Venugopal
b75601e84d Updating the network driver document with IPAM data
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-03 16:38:24 -07:00
Alessandro Boch
ddcfab5f81 libnetwork <-> ipam driver interaction
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-10-03 16:18:19 -07:00
Alessandro Boch
2aaef377f3 IPAM driver
- Add IPAM cotract and remote IPAM hooks
 - Add ipam registration in controller
 - Have default IPAM follow ipamapi contract

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-10-03 16:18:19 -07:00
Jana Radhakrishnan
5e2fb5d251 Merge pull request #581 from mavenugo/discovery
Allowing local joins to happen even when serf is not initialized
2015-10-02 12:59:16 -07:00
Madhu Venugopal
1081687e38 Allowing local joins to happen even when serf is not initialized
With the new Discovery model, join can happen even before serf is
initliazed. It could also happen due to misconfiguration of
--cluster-advertise. The local endpoint join must succeed and later when
the serf initializes and joins the cluster, it will push the local db to
the cluster.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-02 12:20:29 -07:00
aboch
add63f4247 Merge pull request #580 from mavenugo/discovery
serfJoin doesnt happen if self notification comes later
2015-10-01 23:27:18 -07:00
Madhu Venugopal
fac4e67c16 serfJoin doesnt happen if self notification comes later
With the recently introduced docker discovery, the self node discovery
notification can reach the overlay driver after the remote node
discovery notification.  In scenarios such as 2 node setup, it seems more
likely. In those scenarios, the serfJoin is not triggered and hence the
neighborship is not formed between the 2 nodes.

The fix is to retain the knowledge of the neighbor and reuse it
immediately after the serfInit is done. Since we do the serfJoin just
once, there is no harm in changing the neighIP to a new value even if it
is not used.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-01 21:50:54 -07:00
aboch
4a002d14f1 Merge pull request #578 from mavenugo/discovery
Integrating with Docker Discovery
2015-10-01 13:27:43 -07:00
Madhu Venugopal
0066225da5 Integration with Docker Discovery
* integrated hostdiscovery package with the new Docker Discovery
* Integrated hostdiscovery package with libnetwork core
* removed libnetwork_discovery tag
* Introduced driver apis for discovery events
* moved overlay driver to make use of the discovery events
* Using Docker Discovery service.
* Changed integration-tests to make use of the new discovery

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-01 12:32:55 -07:00
Jana Radhakrishnan
04aa94fa6e Merge pull request #579 from mavenugo/discovery_godep
Godep update required for Docker discovery integration
2015-09-30 15:59:06 -07:00
Madhu Venugopal
1b393486b5 Godeps update
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-09-30 08:16:58 -07:00
Santhosh Manohar
6e327a5afb Support for multiple subnets in a overlay network
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2015-09-29 06:51:01 -07:00
Jana Radhakrishnan
00772afa41 Merge pull request #564 from brahmaroutu/gccgo_compile_error
Docker GCCGO CI is causing compilation errors as the varibale is decl…
2015-09-25 15:43:46 -07:00
Srini Brahmaroutu
e8593bdb65 Docker GCCGO CI is causing compilation errors as the varibale is declared and not used.
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-09-25 22:32:43 +00:00
Jana Radhakrishnan
e6340940b0 Merge pull request #563 from mavenugo/adb
Fixes in bridge and overlay drivers
2015-09-25 09:50:49 -07:00
Madhu Venugopal
a41025e9c0 Fixed a few more issues observed during docker integration
- DisableBridgeCreation is misleading. change it to DefaultBridge
- Dont fail the init if localstore cannot be initialized
- added a convenience function to get endpoint for a container

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-09-25 09:40:42 -07:00
Madhu Venugopal
7305922385 Moving overlay configure out of Init and into network create
Ideally, both overlay and libnetwork core must be changed to support
kv-store connection retry. But this is a stop-gap measure to unblock the
discovery related PRs.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-09-24 19:10:37 -07:00
Madhu Venugopal
e4e77353c9 Setting bridgename to be network-id[:12] if bridgename option is empty
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-09-24 19:10:28 -07:00
Jana Radhakrishnan
51699b91aa Merge pull request #560 from mavenugo/adb
Flip the default for the flag AllowNonDefaultBridge in bridge driver
2015-09-24 18:02:12 -07:00
Madhu Venugopal
ffb13d6e8d Merge pull request #561 from mrjana/integ
Introduce end to end overlay integration test
2015-09-24 02:55:21 -07:00
Madhu Venugopal
a42e5f0663 Flip the default for the flag AllowNonDefaultBridge in bridge driver
Replaced it with DisableBridgeCreation and it can be used ONLY in
a special case for docker0 bridge from docker, instead of calling it
from all other case.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-09-24 02:18:35 -07:00
Jana Radhakrishnan
ce44f2478d Add overlay network integration test
This commit adds a basic overlay network
connectivity integration test. By doing this
it adds the basic functions to form a crude
container to run the networking tests. The container
uses a busybox rootfs with network namespace and
/etc/hosts and /etc/resolv.conf generated by
libnetwork.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-09-23 22:04:15 -07:00
Jana Radhakrishnan
50ec2d3a50 Add Sandbox ID to service ls output
Currently ther `service ls` output does not show the
sandbox ID. This adds that to the output so that it can
be used in dnet program.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-09-23 22:04:07 -07:00
Jana Radhakrishnan
24f1845a18 Do not overwrite the /etc/hosts file on Join
Currently on every endpoint Join the /etc/hosts
file is getting overwritten. This blows the already
existing service records. Modify the `updateHostsFile`
function to build the hosts file only on the first
endpoint join and for subsequent joins just update
the existing /etc/hosts file with the additional
network specific service records.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-09-23 22:04:03 -07:00
Jana Radhakrishnan
3023538a56 Merge pull request #556 from mavenugo/bdb-to
libnetwork to make use of boltdb ConnectionTimeout to avoid deadlock
2015-09-22 19:20:04 -07:00
Madhu Venugopal
08d9578e48 Updating tests to use controller.Stop() to cleanup states
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-09-22 14:07:23 -07:00
Madhu Venugopal
0c089712ec Merge pull request #555 from chenchun/fix_doc
Fix outdated docs and comments
2015-09-22 13:46:27 -07:00
Madhu Venugopal
01a0be8e33 Merge pull request #550 from sanimej/ext_conn
Serialize the endpoint join/leave at the sandbox level
2015-09-22 13:39:35 -07:00
Madhu Venugopal
27397dcbdf libnetwork to make use of boltdb ConnectionTimeout to avoid deadlock
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-09-22 13:23:23 -07:00
Jana Radhakrishnan
f626f8e082 Merge pull request #554 from mavenugo/persist
Providing KVObject option to skip persisting object in kvstore
2015-09-22 13:17:30 -07:00
Madhu Venugopal
dd6b8cb408 Update libkv to support boltdb timeout
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-09-22 10:44:58 -07:00
Chun Chen
e82989f845 Fix outdated docs and comments
Signed-off-by: Chun Chen <ramichen@tencent.com>
2015-09-22 23:47:44 +08:00
Madhu Venugopal
725280d03f Providing KVObject option to skip persisting object in kvstore
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-09-22 08:35:38 -07:00
Madhu Venugopal
02fd54ea61 Merge pull request #466 from chenchun/localstore
Add local datastore to persist states of LocalScope network
2015-09-21 19:02:56 -07:00
Chun Chen
72567c355b Various refactor and fixes for the previous two commits including:
1. Don't save localscope endpoints to localstore for now.
2. Add common function updateToStore/deleteFromStore to store KVObjects.
3. Merge `getNetworksFromGlobalStore` and `getNetworksFromLocalStore`
4. Add `n.isGlobalScoped` before `n.watchEndpoints` in `addNetwork`
5. Fix integration-tests
6. Fix test failure in drivers/remote/driver_test.go
7. Restore network to store if deleteNework failed
2015-09-22 01:29:51 +08:00