Commit Graph

35 Commits

Author SHA1 Message Date
Flavio Crisciani c6917f91f5
Add gosimple check
Add the gosimple tool check in the Makefile
Fix all the issues identified

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-07-06 09:42:38 -07:00
Flavio Crisciani 956e2be530
Added more code checks
Added missspelling
Added fmt, vet, lint, ineffassign

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-06-12 11:31:33 -07:00
Santhosh Manohar 54b97aee78 Use vndr for managing libnetwork dependencies
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2017-01-11 17:22:05 -08:00
Puneet Pruthi 566903dd7b libnetwork support for Solaris
Signed-off-by: Puneet Pruthi <puneetpruthi@gmail.com>
2016-10-14 16:38:23 -07:00
Justin Cormack 320a93c618 Make the docker proxy a standalone binary not a re-exec
Rather than re-execing docker as the proxy, create a new command docker-proxy
that is much smaller to save memory in the case where there are a lot of
procies being created. Also allows the proxy to be replaced, for example
in Docker for Mac we have a proxy that proxies to osx instead of locally.

This is the vendoring pull for https://github.com/docker/docker/pull/23312

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-07-04 13:17:16 +01:00
Jana Radhakrishnan a608012e97 Use protobuf in networkdb core messages
Convert all networkdb core message types from go message types to
protobuf message types. This faciliates future modification of the
message structure without breaking backward compatibility.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-05-17 09:18:24 -07:00
Alessandro Boch c378054576 Fix cross compilation issues
- Fix circle-ci-cross target
- Remove unsupported os/arch targets
- Fix dnet build for windows/amd64
- Fix a solaris build breakage

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-04-21 11:20:01 -07:00
Amit Krishnan 7a68bcf166 Enable cross platform build check in circle-ci
Signed-off-by: Amit Krishnan <krish.amit@gmail.com>
2016-04-14 15:01:56 -07:00
Madhu Venugopal 382aeea480 Make macvlan and ipvlan drivers as experimental
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-03-09 19:43:20 -05:00
Vincent Demeester 18fbf39c59 Use gofmt with -s instead of goimports
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-02-12 14:07:00 +01:00
Alessandro Boch 30082c383e Fix predefined pool reservation
- The pool request code does not behave properly in
  case of concurrent requests when client does not
  specify a preferred pool. It may dispense the same
  predefined pool to different networks.
- The issue is common for local and global
  address spaces

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-01-22 14:19:41 -08:00
Madhu Venugopal 09c0a6dabb Merge pull request #848 from aboch/nlvnd
Disable DAD for sandbox IPv6 addresses
2016-01-06 20:18:44 -08:00
Alessandro Boch e3913b2ea9 Disable DAD for sandbox IPv6 addresses
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-01-05 16:51:10 -08:00
Jana Radhakrishnan c6b19c615d Fix default make target
The default make target should be `all` by convention but
since it is not the first target it wasn't getting triggered
as the default target. Fixed the makefile to make `all`
the first and default target.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-01-05 15:55:27 -08:00
Dave Tucker 7ddd97684e 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
Alexander Morozov 373c2459ff Fix build image name
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-10-16 11:33:08 -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 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
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
Chun Chen d35f6502f6 Fix for zookeeper backend
Signed-off-by: Chun Chen <ramichen@tencent.com>
2015-09-17 10:16:34 +08:00
Jana Radhakrishnan cc5664361c Update Godeps and add codegangsta/cli
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>
2015-09-15 22:22:28 -07:00
Jana Radhakrishnan a017a14420 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
Jana Radhakrishnan 2528ec57ff Allow tests to be interrupted
Currently when libnetwork tests are run inside a container
you cannot interrupt them in the middle by pressing ctrl-c
even though all the tests run in foreground. Fix this by running
tests by wrapping the make invocation inside the container
with a shell scripts which installs the SIGINT handler.
Without the handler the kernel does not deliver signals
to the process with PID 1(which in this case was make itself)
and hence make could never be interrupted. With this fix
we capture SIGINT in the shell script and re-raise it in the
the child process (which is make) and that makes the make
interruptible.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-09-01 21:48:09 -07:00
Chun Chen 82137d92de Use github golang tools mirror
Signed-off-by: Chun Chen <ramichen@tencent.com>
2015-07-01 12:57:39 +08:00
Madhu Venugopal 5da83aac26 Moved services to dnet top-level and removed experimental
In prep for the UI/API updates on Docker to integrate the network and
endpoints, this PR removes the experimental tag from dnet and moving it
to docker UI and API and wrap the top-level "network" and "service"
under experimental.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-08 14:23:41 -07:00
Madhu Venugopal 29350c906c Including hostdiscovery conditionaly under a build tag
In order to vendor-in libnetwork to docker, we need to remove the swarm
dependency even though it is used as library. using this PR, a new build
flag libnetwork_discovery is introduced in order to avoid pulling in the
unused hostdiscovery functionality into docker.
We are working with the Swarm project to see if we can modularize the
discovery package to become independent so that we can include them as a
vendor-in package in docker.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-04 05:00:09 -07:00
Madhu Venugopal ed7cba986e Moved all the service commands under experimental build tag
In order to support the docker experimental feature build, moving the
service commands under experimental tag. Please refer to :
https://github.com/docker/docker/pull/13338/ for more information

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-23 13:05:48 -07:00
Alessandro Boch 15cbcc55eb Fix Makefile
- To report the godep test err code to CircleCI

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-05-19 11:06:56 -07:00
Jana Radhakrishnan a971716f29 Fixed an intermittent issue in the libnetwork test
The libnetwork test does not need to run inside a namespace
when inside a container. This results in unpredictable behavior
when the sandbox code unlocks the go routine from the OS thread
while the test code still wants it locked in the OS thread. This
will result in unreachable interfaces when the go routine
migrates to a different OS thread.

Fixed by passing a special test flag which is only set to true
when the test is run inside a container.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-13 00:22:00 +00:00
Michael Bridgen 58bbb00972 Create a build image to avoid install-deps every time
Signed-off-by: Michael Bridgen <mikeb@squaremobius.net>
2015-05-11 21:17:12 +01:00
Jana Radhakrishnan d3f628541c Make endpoint Join and Leave multi-thread safe
- Refactored the Join/Leave code so they are synchronized across multiple go-routines
    - Added parallel test coverage to test mult-thread access to Join/Leave
    - Updated sandbox code to revert back to caller namespace when removing interfaces
    - Changed the netns path to /var/run/netns so the cleanup is simpler on machine
      reboot scenario

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-10 17:36:04 +00:00
Dave Tucker 0c167ba011 Don't fail the build on coveralls upload
If we can't upload to coveralls, don't fail the build.

Goveralls and Coveralls have been a little flaky and started throwing
http 422 errors, although I still see coverage being reported.

It's best in the interim to ignore these, although this should be
removed in future when the service is more stable

Signed-off-by: Dave Tucker <dt@docker.com>
2015-05-06 00:49:41 +01:00
Jana Radhakrishnan 55fe669caa - Fixed the makefile which was not checking failures in test code
- Cleaned up the makefile to remove output clutter

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-04-16 19:00:36 +00:00
Dave Tucker e6f2ce6b70 Report Code Coverage and Add Status Badges
- Update Makefile to generate coverage details when running the tests
- Update CircleCI to use the Makefile
- Add Build and Coverage Badges to README

Closes #20

Signed-off-by: Dave Tucker <dt@docker.com>
2015-04-14 16:19:55 +01:00
Dave Tucker 49f016559e Add Makefile
Fixes #27

Signed-off-by: Dave Tucker <dt@docker.com>
2015-04-08 17:18:17 +01:00