Commit graph

765 commits

Author SHA1 Message Date
Madhu Venugopal
1b393486b5 Godeps update
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-09-30 08:16:58 -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
Chun Chen
8babc3d4d3 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
56e3c1e9d5 Update godep to support boltdb backend
Signed-off-by: Chun Chen <ramichen@tencent.com>
2015-09-21 17:56:32 +08:00
Jana Radhakrishnan
a561351a12 Merge pull request #535 from sanimej/ext_conn
Support for default gateway for containers
2015-09-19 22:15:34 -07:00
Madhu Venugopal
dd9339c166 Merge pull request #548 from mrjana/integ
Introduce multi-node integration tests
2015-09-19 10:07:29 -07:00
Madhu Venugopal
ea8f974f15 Merge pull request #549 from WeiZhang555/doc
fix bad docs format
2015-09-19 08:51:24 -07:00
Madhu Venugopal
ba09d91d0e Merge pull request #547 from mrjana/config
Push driver config during `Init`
2015-09-19 08:50:02 -07:00
Jana Radhakrishnan
d565a4df48 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
1cd9c4dcaa 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
6b1fcf3e6a 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
f33a362b48 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
d7092a63f9 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
09fec4e411 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
eb54ed5d42 Support for default gateway for containers
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2015-09-18 05:02:03 -07:00
Jana Radhakrishnan
ef732a9dce Merge pull request #546 from tomdee/endpoint_locking
Remove unwanted lock
2015-09-17 18:14:33 -07:00
Jana Radhakrishnan
01aa027088 Merge pull request #544 from tomdee/patch-2
Correct formatting in remote.md
2015-09-17 18:11:53 -07:00
Tom Denham
3342e5591b Remove unwanted lock
Fixes #545

Signed-off-by: Tom Denham <tom@tomdee.co.uk>
2015-09-17 18:07:46 -07:00
Madhu Venugopal
69900c01d6 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
9e6378ad57 Correct formatting in remote.md
Signed-off-by: Tom Denham <tom@tomdee.co.uk>
2015-09-17 16:15:41 -07:00
Tom Denham
ba83cbc058 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
3745300f5a Merge pull request #540 from estesp/fix-dir-perms
Correct perms for directory creation
2015-09-17 12:58:13 -07:00
Jana Radhakrishnan
bc082bd6d6 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
bd20fd4813 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
437dfd3a43 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
c062ee449a Merge pull request #537 from mrjana/integ
Introduce test remote plugin in dnet
2015-09-17 11:34:02 -07:00
Jana Radhakrishnan
2479562e72 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
987aab8f3e Merge pull request #534 from aboch/t
Make integration-tests an indipendent target
2015-09-17 08:45:36 -07:00