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>
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>
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>
- 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>
Updated Godeps and added codegangsta/cli into Godeps.
Also cleaned up the unnecessary packages by removing
host_discovery build tag which wasn't getting detected
by godep and was causing all sorts of `godep save` issues.
With this fix committers can do `godep save ./...` freely
to include their new dependencies without any failure.
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
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>
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>
- 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>
- 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>
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>
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>
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>
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>