1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

2520 commits

Author SHA1 Message Date
Flavio Crisciani
9b7922ff6e Fix README flag and expose orphan network peers
- Readme example was using wrong flag
- Network peers were not exposed properly

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2018-03-23 10:19:02 -07:00
Flavio Crisciani
e21dab839d Merge pull request from ctelfer/graceful-lbrm
Gracefully remove LB endpoints from services
2018-03-19 10:59:19 -07:00
Chris Telfer
7d7412f957 Gracefully remove LB endpoints from services
This patch attempts to allow endpoints to complete servicing connections
while being removed from a service.  The change adds a flag to the
endpoint.deleteServiceInfoFromCluster() method to indicate whether this
removal should fully remove connectivity through the load balancer
to the endpoint or should just disable directing further connections to
the endpoint.  If the flag is 'false', then the load balancer assigns
a weight of 0 to the endpoint but does not remove it as a linux load
balancing destination.  It does remove the endpoint as a docker load
balancing endpoint but tracks it in a special map of "disabled-but-not-
destroyed" load balancing endpoints.  This allows traffic to continue
flowing, at least under Linux.  If the flag is 'true', then the code
removes the endpoint entirely as a load balancing destination.

The sandbox.DisableService() method invokes deleteServiceInfoFromCluster()
with the flag sent to 'false', while the endpoint.sbLeave() method invokes
it with the flag set to 'true' to complete the removal on endpoint
finalization.  Renaming the endpoint invokes deleteServiceInfoFromCluster()
with the flag set to 'true' because renaming attempts to completely
remove and then re-add each endpoint service entry.

The controller.rmServiceBinding() method, which carries out the operation,
similarly gets a new flag for whether to fully remove the endpoint.  If
the flag is false, it does the job of moving the endpoint from the
load balancing set to the 'disabled' set.  It then removes or
de-weights the entry in the OS load balancing table via
network.rmLBBackend().  It removes the service entirely via said method
ONLY IF there are no more live or disabled load balancing endpoints.
Similarly network.addLBBackend() requires slight tweaking to properly
manage the disabled set.

Finally, this change requires propagating the status of disabled
service endpoints via the networkDB.  Accordingly, the patch includes
both code to generate and handle service update messages.  It also
augments the service structure with a ServiceDisabled boolean to convey
whether an endpoint should ultimately be removed or just disabled.
This, naturally, required a rebuild of the protocol buffer code as well.

Signed-off-by: Chris Telfer <ctelfer@docker.com>
2018-03-16 15:19:49 -04:00
Flavio Crisciani
aa612217b5 Merge pull request from johnstep/cleanup-hns-endpoints
Delete stale HNS endpoints when creating a network
2018-03-14 15:01:21 -07:00
Flavio Crisciani
0381b26217 Merge pull request from thaJeztah/fix-golang-sync-canonical-import
Fix golang.org/x/sync canonical import path
2018-03-14 08:14:08 -07:00
Sebastiaan van Stijn
a360943a48 Fix golang.org/x/sync canonical import path
The golang.org/x/sync package was vendored using the
github.com/golang/sync URL, but this is not the canonical
URL.

Because of this, vendoring failed in Moby, as it detects
these to be a duplicate import:

    vndr github.com/golang/sync
    2018/03/14 11:54:37 Collecting initial packages
    2018/03/14 11:55:00 Download dependencies
    2018/03/14 11:55:00 Failed to parse config: invalid config format: // FIXME this should be golang.org/x/sync, which is already vendored above

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-03-14 13:11:08 +01:00
Flavio Crisciani
3d6425dedf Merge pull request from fcrisciani/test-ipam
IPAM tests
2018-03-09 11:31:01 -08:00
Flavio Crisciani
4c8d751400 IPAM tests
Added tests for swarm mode and also some new parallel tests

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2018-03-09 11:07:36 -08:00
Flavio Crisciani
b8c14de74a Vendor golang/sync
Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2018-03-09 11:07:28 -08:00
Flavio Crisciani
0890a1a95d Merge pull request from abhi/bitseq
Fix for Duplicate IP issues
2018-03-09 11:03:54 -08:00
Abhinandan Prativadi
a0085a47fd IPAM and Bitseq test cases
This commit contains test cases to verify the changes and to
solidify the library.

Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
2018-03-09 09:24:10 -08:00
Abhinandan Prativadi
fe629b6eba Fixing concurrent map access
This commit fixes panic due to concurrent map access

Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
2018-03-08 11:19:45 -08:00
Abhinandan Prativadi
6a8a15dd9d Fixing Duplicate IP issue in IPAM library
This commit contains fixes for duplicate IP with 3 issues addressed:
1) Race condition when datastore is not present in cases like swarmkit
2) Byte Offset calculation depending on where the start of the bit
   in the bitsequence is, the offset was adding more bytes to the offset
   when the start of the bit is in the middle of one of the instances in
   a block
3) Finding the available bit was returning the last bit in the curent instance in
   a block if the block is not full and the current bit is after the last
   available bit.

Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
2018-03-08 11:19:37 -08:00
Flavio Crisciani
6b9324ec3e Merge pull request from ctelfer/ingress-fix
Prevent ingress deletion when endpoint count == 1
2018-03-08 11:11:08 -08:00
Flavio Crisciani
9786ebb46d Merge pull request from fcrisciani/dup-ip-support
Add check for IP overlap in support.sh
2018-03-07 14:13:37 -08:00
Flavio Crisciani
794025df9f Merge pull request from luzhipeng-zte/linkdel
Add warning message for the failure of deleting link device
2018-03-06 09:53:42 -08:00
ZhiPeng Lu
9ba57c93b8 Add warning message for the failure of deleting link device
Signed-off-by: ZhiPeng Lu <lu.zhipeng@zte.com.cn>
2018-03-06 16:37:45 +08:00
Flavio Crisciani
cf89f97a14 Add check for IP overlap in support.sh
Add a simple check and a summary report for the support script.

Report:
==SUMMARY==
         Processed 3 networks
         IP overlap found: 1
         Processed 167 containers

Overlap found:
*** OVERLAP on Network 0ewr5iqraa8zv9l4qskp93wxo ***
      2  "192.168.1.138",

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2018-03-05 10:14:53 -08:00
John Stephens
c8a3950d8b Delete stale HNS endpoints when creating a network
Signed-off-by: John Stephens <johnstep@docker.com>
2018-03-05 00:12:00 -08:00
Chris Telfer
d84f182717 Prevent ingress deletion when endpoint count == 1
We should not delete an ingress network just because its endpoint count
drops to 1 (the IP address of the sandbox).  This addresses a regression
where the ingress sandbox could be deleted on workers when the last
container leave said sandbox.

Signed-off-by: Chris Telfer <ctelfer@docker.com>
2018-03-02 14:58:51 -05:00
Flavio Crisciani
9bade4d29c Merge pull request from fcrisciani/fix-transient-log
Fix crash if the len was < maxSetStringLen
2018-03-01 09:44:49 -08:00
Flavio Crisciani
1f55734d4c Fix crash if the len was < maxSetStringLen
If the len was less than the max length, there was a panic

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2018-03-01 09:24:36 -08:00
Flavio Crisciani
5bbc19d7fe Merge pull request from luzhipeng-zte/removelinkdel
fix for , calling LinkDel to delete link device when the err is NULL
2018-02-27 17:44:08 -08:00
ZhiPeng Lu
83d1ce9fb5 fix for , calling LinkDel to delete link device when the err of LinkByName is NULL
Signed-off-by: ZhiPeng Lu <lu.zhipeng@zte.com.cn>
2018-02-28 16:57:39 +08:00
Flavio Crisciani
a5a04fa72e Merge pull request from fcrisciani/transient-log
Limit max length transient log
2018-02-26 10:09:24 -08:00
Flavio Crisciani
85791fb3fd Limit max length transient log
Set a limit to the max size of the transient log to avoid
filling up logs in case of issues

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2018-02-26 08:54:22 -08:00
Flavio Crisciani
e49dea42c5 Merge pull request from fcrisciani/join-flag
Add an explicit flag to join network in diagnostic
2018-02-23 15:05:15 -08:00
Flavio Crisciani
d1e6cfa6a1 Add an explicit flag to join network in diagnostic
Usually a diagnostic session wants to check the local state
without this flag the network is joined and left every iteration
altering actually the daemon status.
Also if the diagnostic client is used against a live node, the
network leave has a very bad side effect of kicking the node
out of the network killing its internal status.
For the above reason introducing the flag -a to be explicit
so that the current state is always preserved

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2018-02-23 13:20:38 -08:00
Flavio Crisciani
f8a7f2e7be Merge pull request from selansen/master
Allow user to specify default address pools for docker networks
2018-02-22 17:59:20 -08:00
selansen
4484ea17c3 Allow user to specify default address pools for docker networks
This is new feature that allows  user to specify which subnetwork
 Docker contrainer should choose from when it creates bridge network.

 This libnetwork commit is to address moby PR 36054
Signed-off-by: selansen <elango.siva@docker.com>
2018-02-22 12:14:59 -05:00
Flavio Crisciani
9381f27388 Merge pull request from dani-docker/orca-6793
Make SSD portable and useable outside the default image & error check when network on a particular node has no services.
2018-02-21 15:39:19 -08:00
Flavio Crisciani
73cc26c278 Merge pull request from adamancini/improved_support_script
Improved support script
2018-02-20 19:46:16 -08:00
ada mancini
d5aab13c38 Various support script improvements
Previously, support script dumped the host iptables filter/nat tables,
and each overlay network's network inspect and 'bridge fdb show' and
'brctl showmacs'.  Now we collect much more information.  Support script
dumps iptables filter/nat/mangle, routes and interfaces from iproute2,
bridge fdb table, & ipvsadm table, for the host and containers/overlay
networks on the host.  We also dump a redacted copy of the container
health check status and other debugging information for each container,
in JSON format, and 'docker network inspect -v' for each overlay, if the
client/server support the -v flag.

Signed-off-by: ada mancini <ada@docker.com>
2018-02-20 18:26:33 -05:00
Flavio Crisciani
482def9c58 Merge pull request from thaJeztah/bump-toml
vendor: update BurntSushi/toml for MIT license
2018-02-16 14:24:02 -08:00
Sebastiaan van Stijn
ba5b3ee8d9 Bump BurntSushi/toml for MIT License
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-02-16 13:17:40 +01:00
Sebastiaan van Stijn
71c0bc0b89 Revendor dependencies
re-vendor using vndr a6e196d8b4b0cbbdc29aebdb20c59ac6926bb384

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-02-16 13:17:02 +01:00
Flavio Crisciani
46284f8372 Merge pull request from ishidawataru/sctp
Support SCTP port mapping
2018-02-15 18:06:56 -08:00
Wataru Ishida
2120ed2363 Support SCTP port mapping
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-02-13 16:01:03 +09:00
Dani Louca
f5c62864e9 Make ssd portable and usuable outside the default image.
Add error check when network on a particular node has no services

Signed-off-by: Dani Louca <dani.louca@docker.com>
2018-02-12 17:02:01 -05:00
Flavio Crisciani
92888febdb Merge pull request from fcrisciani/ssd
Import the ssd tool in libnetwork
2018-02-10 09:52:40 -08:00
Flavio Crisciani
1484a5c19b Merge pull request from nwoodmsft/master
Added OutboundNAT policy support for Windows
2018-02-07 10:43:35 -08:00
Flavio Crisciani
a16d469867 Import the ssd tool in libnetwork
Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2018-02-07 09:20:55 -08:00
Nick Wood
bbbfa21a94 libnetwork Windows driver support for outboundnat policy via generic options
Signed-off-by: Nick Wood <nwood@microsoft.com>
2018-02-05 17:07:26 -08:00
Flavio Crisciani
2459e6fbd3 Merge pull request from fcrisciani/debug-client
Diagnostic client
2018-01-29 11:06:21 -08:00
Flavio Crisciani
fd5cbfaaa4 Merge pull request from fcrisciani/ndots
Fix user specified ndots option
2018-01-29 11:03:44 -08:00
Flavio Crisciani
5a658d4cc1 Fix user specified ndots option
Setting ndots to 0 does not allow to resolve search domains
The default will remain ndots:0 that will directly resolve
services, but if the user specify a different ndots value
just propagate it into the container

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2018-01-26 10:07:08 -08:00
Flavio Crisciani
2f6921cbba Diagnostic client
- the client allows to talk to the diagnostic server and
decode the internal values of the overlay and service discovery

- the tool also allows to remediate in case of orphans entries

- added README

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2018-01-25 16:09:37 -08:00
Flavio Crisciani
a59ecd9537 Change diagnose module name to diagnostic
Align it to the moby/moby external api

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2018-01-25 16:09:29 -08:00
Flavio Crisciani
1eaa943f64 Merge pull request from thaJeztah/bump-go-1.9.3
Bump Go to 1.9.3
2018-01-24 11:00:45 -08:00
Flavio Crisciani
4bf50246d1 Merge pull request from fcrisciani/memberlist_revendor
Memberlist revendor and optimizations
2018-01-24 09:20:20 -08:00