Commit graph

704 commits

Author SHA1 Message Date
Zhang Wei
304bfd6261 Add negotiation process for driver scope
Add one capability negotiation interaction after plugin handshake, use
this to determine plugin's capability instead of default "global" scope.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2015-09-15 16:45:38 +08:00
Jana Radhakrishnan
17f56bac82 Merge pull request #521 from aboch/cu
Cleanup external sandbox from test
2015-09-11 14:43:08 -07:00
Alessandro Boch
4104c0d0e5 Cleanup external sandbox from test
- otherwise "ValidKey" file is left behind

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-09-11 14:35:45 -07:00
Jana Radhakrishnan
cfac9179ba Merge pull request #520 from aboch/vd
Limit valid object names
2015-09-11 11:42:13 -07:00
Jana Radhakrishnan
fe24e5a59e Merge pull request #515 from mavenugo/uds_uns
External key handling via reexec
2015-09-11 11:38:20 -07:00
Madhu Venugopal
84ac14e295 Reexec external key handling
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-09-11 11:23:40 -07:00
Alessandro Boch
2682309a23 Limit valid object names
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-09-11 11:02:16 -07:00
aboch
3f0dfcca31 Merge pull request #508 from mrjana/mintf
Remove multiple interface in an endpoint
2015-09-11 09:29:24 -07:00
Madhu Venugopal
9ea1f56cdf Godeps update on libcontainer
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-09-11 09:20:16 -07:00
Jana Radhakrishnan
a5bd12b963 Remove multiple interface in an endpoint
Currently the endpoint data model consists of multiple
interfaces per-endpoint. This seems to be an overkill
since there is no real use case for it. Removing it
to remove unnecessary complexity from the code.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-09-11 09:19:01 -07:00
Madhu Venugopal
52bb21b7bd Merge pull request #510 from aboch/sc
Make lookupSandboxID() reliable
2015-09-10 06:12:31 -07:00
Jana Radhakrishnan
7c54a68907 Merge pull request #512 from chenchun/fix_bug
Fix CI failure due to mistaken imports
2015-09-09 22:42:26 -07:00
Chun Chen
636a967df1 Fix CI failure due to mistaken imports
Signed-off-by: Chun Chen <ramichen@tencent.com>
2015-09-10 13:31:17 +08:00
Jana Radhakrishnan
0e00550af4 Merge pull request #502 from mavenugo/sbox_uns
Support to provide external key to sandbox
2015-09-09 21:39:48 -07:00
Madhu Venugopal
f59502e1bd Support to provide external key to sandbox
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-09-09 20:26:37 -07:00
Alessandro Boch
06d8585503 Make lookupSandboxID() reliable
- it is supposed to be called after lookupContainerID()
  but the latter is not guaranteed to succeed and in
  case of connection error will return what was passed
  to it.
  So in order to be able to operate with both long and short
  container ids in case of lookupContainerID() failure,
  always search by `partial-container-id`

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-09-09 18:24:53 -07:00
Jana Radhakrishnan
ebae95a705 Merge pull request #509 from aboch/pc
Remove stale consul container first
2015-09-09 18:18:33 -07:00
Alessandro Boch
27b37e7473 Remove possible stale containers first
- So test will not fail because container is already there
  Prefer this to re-use the containers as it would contain
  states from last run
- A stale consul or dnet container condition will happen
  in case the previous integ test run aborted

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-09-09 18:00:18 -07:00
Madhu Venugopal
ca8c899f2b Merge pull request #503 from mrjana/bugs
Add integration test infra
2015-09-09 12:20:07 -07:00
Jana Radhakrishnan
c29f99b490 Merge pull request #505 from mountkin/remove-useless-code
remove the useless get netns code in createNetworkNamespace
2015-09-09 08:47:05 -07:00
Shijiang Wei
aade3e7a92 remove the useless get netns code in createNetworkNamespace
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
2015-09-09 23:21:10 +08:00
Madhu Venugopal
76ec5e730d Merge pull request #504 from tmakita/fix-service-detach
Fix inability to detach service
2015-09-09 02:24:20 -07:00
Jana Radhakrishnan
0e40539ebc Add integration test infra
Currently libnetwork does not have any integration test infra
support to tests libnetwork code end2end purely as a black
box. This initial commit adds the infra support to enable
test cases for this.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-09-08 22:58:12 -07:00
Toshiaki Makita
bc4160be38 Fix inability to detach service
CmdServiceDetach() incorrectly uses containerID where sandboxID is
expected. Thus, procDeleteSandbox() fails to find the corresponding
sandbox and returns the "Resource not found" error.

Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
2015-09-09 10:10:11 +09:00
aboch
81dc07fb11 Merge pull request #501 from tmakita/fix-sandboxes-api
Add missing sandboxes routes
2015-09-08 07:22:33 -07:00
Toshiaki Makita
72eb02d807 Add missing sandboxes routes
Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
2015-09-08 15:30:47 +09:00
Madhu Venugopal
2a783ad3a9 Merge pull request #500 from mrjana/bugs
Fix CI failure due to conflicting merges
2015-09-07 19:43:16 -07:00
Jana Radhakrishnan
3528fd9830 Fix CI failure due to conflicting merges
There were two pending PRs with package level
changes but no source level conflicts. This got
merged because git cannot detect this.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-09-07 19:35:39 -07:00
Jana Radhakrishnan
293b811a6c Merge pull request #498 from WeiZhang555/bug
Fix bug for `docker service ls`
2015-09-07 19:21:38 -07:00
Zhang Wei
5f69a077da Fix bug for docker service ls
fix bug for `docker service ls` error:
"Failed to retrieve backend list for service xxx (json: cannot
unmarshal object into Go value of type []client.sandboxResource)"

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2015-09-08 09:37:35 +08:00
Madhu Venugopal
82181e0da9 Merge pull request #494 from mrjana/bugs
Fix bridge driver panic in CreateNetwork
2015-09-07 13:17:48 -07:00
aboch
c2ba4664b3 Merge pull request #499 from calavera/move_test_files
Move test specific functions to a testutils package.
2015-09-07 11:36:05 -07:00
David Calavera
cc02894a50 Move test specific functions to a testutils package.
This way we won't vendor test related functions in docker anymore.
It also moves netns related functions to a new ns package to be able to
call the ns init function in tests. I think this also helps with the
overall package isolation.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-09-07 13:33:28 -04:00
Jana Radhakrishnan
46a773fba6 Fix libkv source out-of-sync with Godeps
Looks like the libkv version vendored in really not in
sync with the git hash value in Godeps.json. The commit
04bd8f67ad
has just updated the Godeps.json without update the source.
Dnet in multi-host testing is broken due to this, while
docker mult-host functionality works because the correct
version of libkv has been vendored in docker/docker.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-09-05 20:56:13 -07:00
Jana Radhakrishnan
225a52c765 Merge pull request #496 from docker/bug
Fix bitsequence set()
2015-09-05 10:57:12 -07:00
Alessandro Boch
84a0a0a98f Fix bitsequence set()
- incorrect handling during datastore write

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-09-04 18:15:54 -07:00
Jana Radhakrishnan
005d8f1f52 Fix bridge driver panic in CreateNetwork
Bridge driver panics in `CreateNetwork` if called without
a prior `Config` call. This causes issues in dnet which
tries to create network using default driver configuration.
It should be valid to call `CreateNetwork` without a prior
`Config` call in which case we need to assume default driver
config.

Fixed this by properly initializing the driver config pointer.
Also introduced a `configured` bool to make sure that still
`Config` is called exactly once for the instance of the bridge
driver.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-09-04 11:19:52 -07:00
Madhu Venugopal
c712abd18e Merge pull request #491 from sanimej/ov-mtu
For the endpoints on overlay network set the MTU to 1450 to avoid fra…
2015-09-04 08:48:23 -07:00
aboch
4c1e5282bf Merge pull request #493 from mrjana/bugs
Fix go fmt errors in the build
2015-09-03 16:52:09 -07:00
Jana Radhakrishnan
33780a2ed5 Fix go fmt errors in the build
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-09-03 16:47:30 -07:00
Jana Radhakrishnan
e02d88b716 Merge pull request #443 from aboch/mb
Fixes ip allocation for multi bridge networks
2015-09-03 16:30:19 -07:00
Jana Radhakrishnan
7b2877280e Merge pull request #490 from tmakita/test-err-msg
Add TestEndToEndErrorMessage
2015-09-03 09:53:26 -07:00
Toshiaki Makita
36e7a8b168 Add TestEndToEndErrorMessage
Test if error messages from daemon are not empty strings.

Confirmed it fails without af323c7.

 --- FAIL: TestEndToEndErrorMessage (0.03s)
 	api_test.go:2266: Empty response error message.

Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
2015-09-03 13:36:08 +09:00
Madhu Venugopal
5d8db5cec2 Merge pull request #487 from aboch/tmakita
Don't discard error message on sending response
2015-09-02 16:22:28 -07:00
Toshiaki Makita
af323c7006 Don't discard error message on sending response
Error messages are always discarded and it makes diagnostic difficult
when error occurs.

Before:
$ dnet network create -d overlay ov1
error : ""
$ docker network create -d overlay ov1
Error response from daemon: ""

After:
$ dnet network create -d overlay ov1
error : "no datastore configured. cannot obtain vxlan id"
$ docker network create -d overlay ov1
Error response from daemon: "no datastore configured. cannot obtain vxlan id"

Breakage caused by  11094f2

Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
2015-09-02 16:15:14 -07:00
Santhosh Manohar
1426728a64 For the endpoints on overlay network set the MTU to 1450 to avoid fragmentation when the vxlan header gets added
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2015-09-02 09:58:36 -07:00
Jana Radhakrishnan
aad77d46dd Merge pull request #483 from mavenugo/cp
Cherry-picking #482 to master
2015-09-02 09:10:50 -07:00
David Calavera
d216db6ef2 Do not print the word nil in a log.
Because it doesn't mean anything.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-09-02 08:48:45 -07:00
Madhu Venugopal
94453a45cb Merge pull request #481 from mrjana/bugs
Allow tests to be interrupted
2015-09-01 23:16:54 -07:00
Jana Radhakrishnan
a6f6e2f2b9 Merge pull request #472 from cloudflare/remap-lock
lock port mapper when reapplying iptables rules
2015-09-01 22:00:49 -07:00