Commit graph

52 commits

Author SHA1 Message Date
Sebastiaan van Stijn
745ba3ecbc
libnetwork: remove etcd-related code and tests
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-06 18:45:43 +01:00
Sebastiaan van Stijn
147173b099
libnetwork: remove consul-related code and tests
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-06 18:45:41 +01:00
Sebastiaan van Stijn
a7d0f3060a
libnetwork: remove zookeeper-related code and tests
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-06 18:28:30 +01:00
Sebastiaan van Stijn
a384f83e7a
libnetwork: remove CircleCI config and code
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-09 12:31:52 +02:00
Brian Goff
4b981436fe Fixup libnetwork lint errors
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-06-01 23:48:32 +00:00
Euan Harris
587783fb82 Merge pull request #1656 from huikang/remove-unused-testcode
Removed unused integration test code
2019-06-27 09:57:12 +01:00
Yan Zhu
ce46100a27 doc: fix typo
Signed-off-by: Yan Zhu <yanzhu@alauda.io>
2018-09-07 11:48:15 +08:00
Josh Soref
a06f1b2c4e Spelling fixes
* addresses
* assigned
* at least
* attachments
* auxiliary
* available
* cleanup
* communicate
* communications
* configuration
* connection
* connectivity
* destination
* encountered
* endpoint
* example
* existing
* expansion
* expected
* external
* forwarded
* gateway
* implementations
* implemented
* initialize
* internally
* loses
* message
* network
* occurred
* operational
* origin
* overlapping
* reaper
* redirector
* release
* representation
* resolver
* retrieve
* returns
* sanbdox
* sequence
* succesful
* synchronizing
* update
* validates

Signed-off-by: Josh Soref <jsoref@gmail.com>
2018-07-12 12:54:44 -07:00
Hui Kang
c00467aaac Removed unused integration test code
TrivialFix

Signed-off-by: Hui Kang <kangh@us.ibm.com>
2017-02-20 12:43:31 -05:00
Madhu Venugopal
9054ac2b48 Provide a way for libnetwork to make use of Agent mode functionalities
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-06-05 18:41:21 -07:00
Jana Radhakrishnan
92f074c095 Fix flakiness in dnet_exec
With docker 1.11 based dnet tests, the dnet_exec is sometimes exiting
with exit code 129 because the process is getting a SIGHUP. Although the
reason or source of the SIGHUP is unknown, it is making the tests flaky
because non-zero exit code. Fixed it by trapping SIGHUP inside the
container so that we can run the test code successfully.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-05-17 14:16:23 -07:00
Jana Radhakrishnan
ffdceda255 Add service support
Add a notion of service in libnetwork so that a group of endpoints
which form a service can be treated as such so that service level
features can be added on top. Initially as part of this PR the support
to assign a name to the said service is added which results in DNS
queries to the service name to return all the IPs of the backing
endpoints so that DNS RR behavior on the service name can be achieved.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-05-05 16:47:05 -07:00
Jana Radhakrishnan
bd74df7b41 Dnet agent mode support and IT
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-05-05 13:59:00 -07:00
Jana Radhakrishnan
15237db7d6 Fix IT test breakages
With DNS resolution happening within the container namespace
test should not try to ping a DNS name and expect a packet
loss message. It will only show up as a DNS name resolution
failure. Changed the bridge internal test to test for a
well known IP address.

Also rearranged the overlay internal tests so that it gets
to run before the dnet container is removed which was
happening in previous tests.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-04-10 11:05:39 -07:00
Alessandro Boch
a5aeffcb59 Fix when connecting/disconnecting to/from default gw network
- Restoring original behavior where on disconnect
  from overlay network (only connected network), it also
  disconnects from default gw network.
- On sandbox delete, the leave and delete of each
  endpoint is performed, regardless of whether the endpoint
  is the gw network endpoint. This endpoint is already
  automatically removed in endpoint.sbLeave()
- Also do not let internal network dictate container does
  not need external connectivity. Before this fix, if a container
  was connected to an overlay and an internal network, it may not
  get attached to the default gw network.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-04-06 09:29:41 -07:00
Madhu Venugopal
12f04e292f Revert "Do not leave/delete gw endpoint twice"
This reverts commit c957564753 introduced
via #1064.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-04-05 18:55:16 -07:00
Alessandro Boch
c957564753 Do not leave/delete gw endpoint twice
- On sandbox delete, the leave and delete of each
  endpoint is performed, regardless of whether the endpoint
  is the gw network endpoint. This endpoint is already
  automatically removed in endpoint.sbLeave() by
  sb.clearDefaultGW() when the sandbox is marked for
  deletion.
- Also restoring otiginal behavior where on disconnect
  from overlay network (only connected network), it also
  disconnects from default gw network.
- Also do not let internal network dictate container does
  not need external connectivity. Before this fix, if a container
  was connected to an overlay and an internal network, it may not
  get attached to the default gw network.
- needDefaultGw() takes now into account whether the sandbox
  is marked for deletion

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-04-05 11:32:49 -07:00
Stefan Weil
13451d9a07 Fix some typos in comments and strings
All of them were found and fixed by codespell.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-03-01 16:45:14 +01:00
Madhu Venugopal
1419d96a01 Reducing the complexity in default gateway service handling
By removing the need to clear the default gateway during sbJoin and
sbLeave to account for other bridge network, the default-gw endpoint
will stay with the container, it will also help retain the container
property.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-01-23 11:10:00 -08:00
Madhu Venugopal
e88b95c13f Remove isNodeAlive check while force deleting endpoint
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-01-12 17:49:17 -08:00
Jana Radhakrishnan
928bc5944f Merge pull request #862 from mavenugo/epcleanup
Force endpoint delete
2016-01-12 11:05:31 -08:00
Madhu Venugopal
02d6721763 dnet client update for -force unpublish and Integration Tests
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-01-12 18:50:38 +00:00
Chun Chen
7b64b1c293 Add internal network support for bridge networks
Signed-off-by: Chun Chen <ramichen@tencent.com>
2016-01-11 20:49:41 +08:00
Madhu Venugopal
2db863e5d7 Global alias support
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-01-08 12:27:15 -08:00
Madhu Venugopal
be981267c0 alias support in dnet and integration-tests
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-01-07 14:50:29 -08:00
Santhosh Manohar
cf7ed0a717 Embedded DNS server
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-01-07 00:25:26 -08:00
Chun Chen
59e1e42ce7 Add tests for internal network
Signed-off-by: Chun Chen <ramichen@tencent.com>
2015-12-22 09:31:50 +08:00
Jana Radhakrishnan
b7d0fefabc Add overlay network support < 3.16 kernels
Add support for overlay networking in older kernels.

Following were done to achieve this:
    + Create the vxlan network in host namespace.
    + This may create conflicts with other private
      networks so check for conflicts and fail a
      join if there is any conflict.
    + Add iptable based filtering to only allow
      subnet bridges in the same network to forward
      traffic while different network bridges will
      not be able to forward b/w each other. Also
      block traffic to overlay network originating
      from the host itself.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-12-17 10:17:03 -08:00
Dave Tucker
b67e986b75 Multi-Arch Support
Compile the dnet tool for Linux (x86, amd64 and arm)
and Windows (x86 and amd64)

- Moved installation of dependencies into `Dockerfile.build`
- Remove `start-services` from Makefile
   - That's the responsibility of Docker or build environment
- Removed utils depending on `netlink` from `netutils/utils.go`

Unable to add `make cross` to CircleCI just yet as there are some
issues to solve that are unrelated to this PR

Also fix `.gitignore` which was not updated after changing the build
image name in #667

Signed-off-by: Dave Tucker <dt@docker.com>
2015-11-25 22:47:41 +00:00
Madhu Venugopal
1aa88fa870 Allow endpoint delete if sandbox identifier is stale
There are cases as seen in https://github.com/docker/docker/issues/17984
the sandbox could be stale in endpoint structure, when the actual
sandbox is removed during the cleanup phase. Hence instead of just
validating for sandboxID, make sure if it is actually present in the
sandboxes DB managed by the controller.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-11-17 21:00:46 -08:00
Jana Radhakrishnan
ab0c0df288 Add IT case for external connectivity
Added IT cases for external connectivity check for bridge
and overlay networks, both initially and after a restart.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-28 19:10:38 -07:00
Jana Radhakrishnan
ed9d4d890a Merge pull request #701 from denverdino/master
Fix the issue for the --cluster-store URL with path
2015-10-26 12:05:21 -07:00
Li Yi
0e2ff9dd71 Add more integration test cases
Change-Id: I892d35380b3e968553bbeb3092c16f5ae5b110b7
Signed-off-by: Li Yi <denverdino@gmail.com>
2015-10-26 19:05:14 +08:00
Jana Radhakrishnan
92f7f2e1a0 Add IT case for proper /etc/hosts handling
Added an IT case for checking proper /etc/hosts
handling in the overlay network. This also to see
if there are any stale entries in the /etc/hosts

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-24 17:45:34 -07:00
Jana Radhakrishnan
c3c4825f80 Purge remote endpoints from watch if it is local
A local endpoint is known to the watch database only
during Join. But the same endpoint can be known to the
watch database as remote endpoint well before the Join
because a CreateEndpoint updates the endpoint to the store.
So on Join when you come to know that this is indeed a
local endpoint remove it from remote endpoint list and add it
to local endpoint list.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-21 21:20:12 -07:00
Jana Radhakrishnan
773648507d TC for ungraceful restart of default network
Added an integration test to test the ungraceful
restart of the default bridge network.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-19 13:31:07 -07:00
Jana Radhakrishnan
33aa626bc9 Add etcd integrations tests
- Added etcd integration test for overlay
    - Added etcd integration test for multinode
      with mock test driver suitable for circleci
    - Added multinode tests for zookeeper
    - Made the script smart enough to only start
      data stores necessary for the requested suites

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-14 23:07:30 -07:00
Jana Radhakrishnan
ac1cf3f784 Add support for selectively running a suite
- With the selectively running a suite support
      one can do the following to select which suite
      of tests to run:
	 SUITES="simple multi" sudo -E make integration-tests
    - Refactored and cleaned up some ununsed code in helpers.bash
    - Added discover string parse function to parse discovery
      string into provide and address

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-13 22:42:06 -07:00
Chun Chen
b92b013820 Add overlay zookeeper test
Signed-off-by: Chun Chen <ramichen@tencent.com>
2015-10-13 14:05:09 -07:00
Jana Radhakrishnan
888f13d17b Make the integration tests robust
Currently integration test is a bit flaky because of
variability in the dnet bootup time. Fixed it to wait for
dnet to come up before performing any tests.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-09 00:06:51 -07:00
Jana Radhakrishnan
be700ec0eb Add default network restart test case
Added restart test for default network so that we can test
bridge network persistence. Also added changes to dnet to
delete the default network if it is present.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-08 21:31:19 -07:00
Jana Radhakrishnan
e41b4765bd Cleanup dangling sandboxes on boot up
Currently when docker exits ungracefully it may leave
dangling sandboxes which may hold onto precious network
resources. Added checkpoint state for sandboxes which
on boot up will be used to clean up the sandboxes and
network resources.

On bootup the remaining dangling state in the checkpoint
are read and cleaned up before accepting any new
network allocation requests.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-07 20:08:47 -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
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
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
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
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
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
Jana Radhakrishnan
ea4cdf441e 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
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