Commit graph

2432 commits

Author SHA1 Message Date
Flavio Crisciani
8c21351e3e Changed the name of the server pointer
Changed the pointer name and added a comment

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-12-05 13:45:08 -08:00
Flavio Crisciani
1a2efea39e Call the Shutdown on the server
This is the right way to call for a clean shutdown

Return application/json as content-type when appropriate

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-12-05 13:17:42 -08:00
Flavio Crisciani
68fb31aa4b Merge pull request #2029 from fcrisciani/fix_log
Fix log
2017-12-04 20:38:42 -08:00
Flavio Crisciani
f7023e11c8 Remove useless error log
Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-12-04 20:36:58 -08:00
Madhu Venugopal
6eb37c2aa3 Merge pull request #2027 from fcrisciani/debug-framework
Diagnose framework for networkDB
2017-12-04 10:34:02 -08:00
Madhu Venugopal
fbc120417b Merge pull request #1976 from fcrisciani/netlink-timeouts
Netlink timeouts
2017-12-04 10:33:27 -08:00
Flavio Crisciani
5b89af1bba Vendor latest netlink library
- needed the methods to set the proper timeout

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-12-04 09:40:38 -08:00
Flavio Crisciani
6736b223ec Set socket timeout on netlink sockets
In case the file descriptor of the netlink socket is closed
the recvfrom is not returning. This may create deadlock conditions.
The current solution is to make sure that all the netlink socket used
have a proper timeout set on them to have the possibility to return

Added test to emulate the watchMiss condition

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-12-04 09:40:27 -08:00
Flavio Crisciani
3e544bc500 Avoid extra notification on node leave
If a node leave, avoid to notify the upper layer
for entries that are already marked for deletion

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-12-01 16:19:38 -08:00
Flavio Crisciani
b578cdce86 Diagnose framework for networkDB
This commit introduces the possibility to enable a debug mode
for the networkDB, this will allow the opening of a tcp port
on localhost that will expose the networkDB api for debugging
purposes.

The API can be discovered using curl localhost:<port>/help
It support json output if passed json as URL query parameter
option and pretty printing if passing json=pretty

All the binaries values are serialized in base64 encoding, this
can be skip passing the unsafe option as url query parameter

A simple go client will follow up

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-12-01 16:19:35 -08:00
Flavio Crisciani
37cedaa072 Merge pull request #2025 from pradipd/lbfix-PRfeedback
Addressing feedback from lbfix PR
2017-11-30 12:59:06 -08:00
Pradip Dhara
4aab854d6d Addressing feedback from PR https://github.com/docker/libnetwork/pull/2011
Signed-off-by: Pradip Dhara <pradipd@microsoft.com>
2017-11-30 00:22:30 -08:00
Flavio Crisciani
9037a42bae Merge pull request #2011 from pradipd/lbfix
Move load balancer sandbox creation/deletion into libnetwork.
2017-11-29 11:10:07 -08:00
Flavio Crisciani
b4973cd6b0 Merge pull request #2013 from fcrisciani/netdb-node-race
NetworkDB node management race
2017-11-27 14:55:51 -08:00
Flavio Crisciani
f0fcb0bbe6 Fixed race on quick node fail/join
The previous logic was not properly handling the case of a node
that was failing and oining back in short period of time.
The issue was in the handling of the network messages.
When a node joins it sync with other nodes, these are passing
the whole list of nodes that at best of their knowledge are part
of a network. At this point if the node receives that node A is part
of the network it saves it before having received the notification
that node A is actually alive (coming from memberlist).
If node A failed the source node will receive the notification
while the new joined node won't because memberlist never advertise
node A as available. In this case the new node will never purge
node A from its state but also worse, will accept any table notification
where node A is the owner and so will end up in a out of sync state
with the rest of the cluster.

This commit contains also some code cleanup around the area of node
management

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-11-27 14:38:06 -08:00
Flavio Crisciani
4037132b33 Fix listen port for test infra
Update Dockerfile, curl is used for the healthcheck
Add /dump for creating the routine stack trace

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-11-16 16:23:44 -08:00
Flavio Crisciani
a41f623b10 Merge pull request #1957 from fcrisciani/netdb-gc-test
Add test to confirm garbage collection
2017-11-08 16:25:47 -08:00
Pradip Dhara
ecb4442ab3 Fixing circleci.
Signed-off-by: Pradip Dhara <pradipd@microsoft.com>
2017-11-07 00:00:31 -08:00
Madhu Venugopal
2b1a999d11 Merge pull request #2004 from mavenugo/ec
endpoint_cnt store updates should not create an object
2017-11-06 10:06:36 -08:00
Pradip Dhara
0d1f9c4c97 Move load balancer sandbox creation/deletion into libnetwork.
Signed-off-by: Pradip Dhara <pradipd@microsoft.com>
2017-11-05 21:48:46 -08:00
Madhu Venugopal
a7aa2b2bf8 Merge pull request #2007 from dnephin/support-override-of-binary-name
Support override of binary name
2017-10-31 16:41:08 -07:00
Daniel Nephin
12891fe687 Support override of binary name
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2017-10-31 16:43:48 -04:00
Madhu Venugopal
2c8670b496 endpoint_cnt store updates should not create an object
endpoint_cnt object is created during network create and destroyed when
network is deleted. But the updateToStore function creates an object
when it is not present in the store. endpoint_cnt is a mutable object
and is updated during endpoint create and delete events. If endpoint
create or delete happens after the network is deleted, it can
incorrectly create an endpoint_cnt object in the store and that can
cause problems when the same network is created again later.

The fix is to not create the endpoint_cnt object when endpoint_cnt is
incremented or decremented

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2017-10-26 17:52:40 -07:00
Madhu Venugopal
e3048b52c7 Merge pull request #1975 from thaJeztah/unfork-docker
bump docker/docker to master and unfork dependencies
2017-10-25 15:51:20 -07:00
Madhu Venugopal
161447ebea Merge pull request #2002 from thaJeztah/remove-solaris
Remove Solaris support
2017-10-25 08:38:41 -07:00
Sebastiaan van Stijn
f864421ead bump docker/docker to master and unfork dependencies
This patch updates all dependencies to match what is
used in moby/moby. Making the dependencies match
what is used in that repository makes sure we test
with the same version as libnetwork is later built
with in moby.

This also gets rid of some temporary forks that were
needed during the migration of Sirupsen/logrus to
sirupsen/logrus.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-10-25 17:26:25 +02:00
Sebastiaan van Stijn
276a452f17 Remove Solaris support
Solaris support for Docker will likely not reach completion,
so removing these files as they are not in use and not
maintained.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-10-25 15:33:06 +02:00
Madhu Venugopal
b4856717b9 Merge pull request #2000 from trapier/support_script_wait_for_iptables_lock
wait for iptables lock in support script
2017-10-24 11:24:09 -07:00
Madhu Venugopal
1d1f63d4fb Merge pull request #1951 from msabansal/savefail
Ignore failure to save hns endpoint to store
2017-10-24 10:56:27 -07:00
Trapier Marshall
1b49b17ef5 wait for iptables lock in support script
Addresses failure to collect iptables information if lock is held during
data capture. Follows the reccomendation of iptables stderr in this
scenario:

```
Another app is currently holding the xtables lock. Perhaps you want to
use the -w option?
```

Signed-off-by: Trapier Marshall <trapier.marshall@docker.com>
2017-10-24 12:35:26 -04:00
Flavio Crisciani
7fbaf6de2c Add test to confirm garbage collection
- Create a test to verify that a node that joins
  in an async way is not going to extend the life
  of a already deleted object

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-10-23 09:58:57 +02:00
Victor Vieux
506a9245c7 Merge pull request #1991 from fcrisciani/test_sd_cleanup
Add test for cleanupServiceDiscovery
2017-10-19 13:20:14 -07:00
Flavio Crisciani
aa81c6d265 Add test for cleanupServiceDiscovery
Unit test for the cleanupServiceDiscovery,
follow up of PR: #1985

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-10-19 13:36:29 +02:00
Madhu Venugopal
e5ebc4bbdd Merge pull request #1985 from fcrisciani/fix-attachable-cnt
Handle cleanup DNS for attachable container
2017-10-18 09:48:00 -07:00
Flavio Crisciani
1732ab426d Handle cleanup DNS for attachable container
Attachable containers they are tasks with no service associated
their cleanup was not done properly so it was possible to have
a leak of their name resolution if that was the last container
on the network.
Cleanupservicebindings was not able to do the cleanup because there
is no service, while also the notification of the delete arrives
after that the network is already being cleaned

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-10-12 21:41:29 -07:00
Flavio Crisciani
d9299e99ea Merge pull request #1981 from fcrisciani/fix-code
Explicitly pass the sha to codecov
2017-10-12 10:22:37 -07:00
Flavio Crisciani
da1e931693 Explicitly pass the sha to codecov
In case of merge commit, the sha passed to the codecov tool
is the one of the merged commit intstead of the merge commit
this creates error because the base commit is always different.
Passing it explicitely should fix it

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-10-12 09:45:34 -07:00
Flavio Crisciani
26ad4ebbd8 Merge pull request #1971 from thaJeztah/bump-golang-to-1.8.4
Bump Go to 1.8.4
2017-10-09 16:11:27 -04:00
Madhu Venugopal
98fb784130 Merge pull request #1964 from pradipd/hotadd
Enable Hotadd support for windows
2017-10-08 12:28:15 -07:00
Sebastiaan van Stijn
d64c34e4a5 Bump Go to 1.8.4
Bumps the Go version used to 1.8.4, which contains security fixes;
https://groups.google.com/forum/#!topic/golang-announce/1hZYiemnkdE

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-10-08 15:46:14 +02:00
Madhu Venugopal
5ec49706df Merge pull request #1974 from cpuguy83/iptables_no_dns_lookup
Disable hostname lookup on chain exists check
2017-10-07 06:45:47 -07:00
Brian Goff
1dcffbeb3f Disable hostname lookup on chain exists check
Without `-n`, iptables will attempt to lookup hostnames for IP
addresses, which can slow down the call dramatically.
Since we don't need this, and generally don't even care about the
output, use the `-n` flag to disable this.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-10-07 09:06:06 -04:00
Flavio Crisciani
4daeb036fd Merge pull request #1973 from thaJeztah/fix-typo
Fix typo in overlay log message
2017-10-06 17:22:26 -07:00
Sebastiaan van Stijn
01688ba253 Fix typo in overlay log message
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-10-07 01:55:30 +02:00
Madhu Venugopal
029ad186cf Merge pull request #1968 from fcrisciani/fix-marshalling
Fix IPMask marshalling
2017-10-03 20:01:45 -07:00
Flavio Crisciani
1fe48e8608 Fix IPMask marshalling
Fix marshalling and add test

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-10-03 19:38:54 -07:00
Flavio Crisciani
1bb664f689 Merge pull request #1788 from abhi/ipam_alloc
Serializing bitseq alloc
2017-10-03 13:30:34 -07:00
Abhinandan Prativadi
3d44975995 Adding a unit case to verify rollover
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
2017-10-03 12:15:34 -07:00
Madhu Venugopal
44dbb26172 Merge pull request #1935 from fcrisciani/overlay-setmatrix
Overlay fix for transient IP reuse
2017-10-03 07:38:44 -07:00
Pradip Dhara
955b8b4593 Changing containerID to sandboxID based off feedback/conversation with Madhu.
Signed-off-by: Pradip Dhara <pradipd@microsoft.com>
2017-10-02 22:48:06 -07:00