906 Commits

Author SHA1 Message Date
Madhu Venugopal 02ba4f6df7 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 4c8dcea884 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 13cb53987a 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 0a6c80750e 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 4b7359ccf2 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 70b6f8e519 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 2dbfecfb13 Merge pull request #555 from chenchun/fix_doc
Fix outdated docs and comments
2015-09-22 13:46:27 -07:00
Madhu Venugopal 0f3dd63ca3 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 d6288cfa9d 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 ed0597ba01 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 b14792bc93 Update libkv to support boltdb timeout
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-09-22 10:44:58 -07:00
Chun Chen 3ff8b75315 Fix outdated docs and comments
Signed-off-by: Chun Chen <ramichen@tencent.com>
2015-09-22 23:47:44 +08:00
Madhu Venugopal 2bf6bc8278 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 5df9f84ee8 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 1edba8531d 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
Chun Chen b35d1735d4 Add local datastore to persist states of LocalScope network
Signed-off-by: Chun Chen <ramichen@tencent.com>
2015-09-21 17:58:51 +08:00
Chun Chen 91a8dc00f3 Update godep to support boltdb backend
Signed-off-by: Chun Chen <ramichen@tencent.com>
2015-09-21 17:56:32 +08:00
Jana Radhakrishnan 92a61bcef8 Merge pull request #535 from sanimej/ext_conn
Support for default gateway for containers
2015-09-19 22:15:34 -07:00
Madhu Venugopal 3d20dfa53f Merge pull request #548 from mrjana/integ
Introduce multi-node integration tests
2015-09-19 10:07:29 -07:00
Madhu Venugopal b5b25e3047 Merge pull request #549 from WeiZhang555/doc
fix bad docs format
2015-09-19 08:51:24 -07:00
Madhu Venugopal b0e7a335fa Merge pull request #547 from mrjana/config
Push driver config during `Init`
2015-09-19 08:50:02 -07:00
Jana Radhakrishnan 900aca112b Push driver config during Init
Currently the driver configuration is pushed through a separate
api. This makes driver configuration possible at any arbitrary
time. This unncessarily complicates the driver implementation.
More importantly the driver does not get access to it's
configuration before it can do the handshake with libnetwork.
This make the internal drivers a little bit different to
external plugins which can get their configuration before the handshake
with libnetwork.

This PR attempts to fix that mismatch between internal drivers and
external plugins.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-09-19 08:43:34 -07:00
Santhosh Manohar 69ddeab4de Serialize the endpoint join/leave at the sandbox level
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2015-09-19 07:31:51 -07:00
Zhang Wei 6ce27f1fb9 fix bad docs format
Fix some bad docs format

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2015-09-19 18:09:13 +08:00
Jana Radhakrishnan c2dbed5e71 Introduce multi-node integration tests
- Create a wrapper script to run intergation tests
      so that setups and teardowns happen in more
      optimal manner
    - Add traps to cleanup containers on failure or
      user interrupt
    - Introduce basic multi-node integration tests
    - Removed default network, default driver tests
      as they may not be useful in the near future

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-09-18 22:49:28 -07:00
Jana Radhakrishnan 806ae00cf8 Merge pull request #542 from aboch/bs
Allow to set bits in a range in bitseq
2015-09-18 16:58:29 -07:00
Alessandro Boch 037330b881 Allow to set bits in a range in bitseq
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-09-18 14:42:36 -07:00
Santhosh Manohar afc2845efa Support for default gateway for containers
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2015-09-18 05:02:03 -07:00
Jana Radhakrishnan e5fea92a6c Merge pull request #546 from tomdee/endpoint_locking
Remove unwanted lock
2015-09-17 18:14:33 -07:00
Jana Radhakrishnan bc89d694d9 Merge pull request #544 from tomdee/patch-2
Correct formatting in remote.md
2015-09-17 18:11:53 -07:00
Tom Denham c9b7f3eb60 Remove unwanted lock
Fixes #545

Signed-off-by: Tom Denham <tom@tomdee.co.uk>
2015-09-17 18:07:46 -07:00
Madhu Venugopal e6208d308c Merge pull request #543 from tomdee/settings-routes-after-up
Set interfaces routes after the interface is up
2015-09-17 18:02:41 -07:00
Tom Denham 58fc9e1853 Correct formatting in remote.md
Signed-off-by: Tom Denham <tom@tomdee.co.uk>
2015-09-17 16:15:41 -07:00
Tom Denham 3784b194a0 Set interfaces routes after the interface is up
Fixes #485

The code previously relied on an uninteded side effect. When the
interface name was set, this causes the interface to come up
prematurely. Once that side effect was removed, routes could
no longer be set.

This change ensures that routes are only set after the interface
is brought up.

Signed-off-by: Tom Denham <tom@tomdee.co.uk>
2015-09-17 16:05:25 -07:00
aboch e854ae3151 Merge pull request #540 from estesp/fix-dir-perms
Correct perms for directory creation
2015-09-17 12:58:13 -07:00
Jana Radhakrishnan 51abe69a24 Merge pull request #541 from estesp/ignore-update
Add cmd/dnet/dnet binary to .gitignore
2015-09-17 12:29:13 -07:00
Phil Estes 6817d63ad2 Add cmd/dnet/dnet binary to .gitignore
Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-09-17 15:21:17 -04:00
Phil Estes 9e400ad567 Correct perms for directory creation
Directories should be 0755, not 0644

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-09-17 15:19:23 -04:00
Madhu Venugopal b3ed725873 Merge pull request #537 from mrjana/integ
Introduce test remote plugin in dnet
2015-09-17 11:34:02 -07:00
Jana Radhakrishnan a2f832fdb4 Introduce test remote plugin in dnet
There are multiple goals of introducing test driver plugin
  - Need a driver which can be configured to simulate
    different driver behaviors
  - For pure libnetwork multi-host integration testing
    a test driver configured for global scope can be used
    without trying to use a real driver like overlay
    which comes with it's own dependencies which can't
    be satisfied all enviroments(I am looking at you
    circleci)

This PR also makes all test cases that we have so far to be run
in circleci without any skipping needed.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-09-17 10:38:34 -07:00
Madhu Venugopal db49da8521 Merge pull request #534 from aboch/t
Make integration-tests an indipendent target
2015-09-17 08:45:36 -07:00
Alessandro Boch 3f99dc594a Make integration-tests an indipendent target
- Also add target for cleaning up dnet binary

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-09-17 08:27:20 -07:00
Madhu Venugopal b85c321af0 Merge pull request #462 from chenchun/data_store
Fix for zookeeper backend
2015-09-17 03:20:02 -07:00
Chun Chen d35f6502f6 Fix for zookeeper backend
Signed-off-by: Chun Chen <ramichen@tencent.com>
2015-09-17 10:16:34 +08:00
Madhu Venugopal 00a92f066e Merge pull request #536 from mrjana/bugs
Fix unmarshal error in endpoint interface
2015-09-16 14:42:44 -07:00
Jana Radhakrishnan 785ef1786c Fix unmarshal error in endpoint interface
Instead of passing the pointer to &ep.iface the current
code is passing the value. So the source variable is not
getting updated properly.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-09-16 13:54:29 -07:00
Madhu Venugopal e5cb24b990 Merge pull request #529 from mrjana/integ
Add more integration tests
2015-09-16 10:32:47 -07:00
Jana Radhakrishnan c8c693c94f Add simple integration test cases
- Enhance dnet to use codegansta/cli as the frontend
    - Add `container create/rm` commands only in dnet
    - With the above dnet enhancements add more integration tests

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-09-16 09:17:32 -07:00
Madhu Venugopal 927d276590 Merge pull request #532 from chenchun/update_libkv
Update libkv to latest commit
2015-09-16 03:46:29 -07:00
Chun Chen feb25a9dc4 Update libkv to latest commit
Signed-off-by: Chun Chen <ramichen@tencent.com>
2015-09-16 18:20:26 +08:00