Commit graph

1748 commits

Author SHA1 Message Date
Madhu Venugopal
e969e6ef61 Merge pull request #1735 from fcrisciani/init_race_cond
Fix for swarm init/leave race condition
2017-05-09 18:19:31 -07:00
Flavio Crisciani
da9ac65ea6 Remove explicit set of memberlist protocol
Memberlist does a full validation of the protocol version (min, current, max)
amoung all the ndoes of the cluster.
The previous code was setting the protocol version to max version.
That made the upgrade incompatible.

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-05-08 16:58:53 -07:00
Flavio Crisciani
a2bf0b35d6 Fix for swarm/libnetwork init race condition
This change cleans up the SetClusterProvider method.
Swarm calls the SetClusterProvider to pass to libnetwork the pointer
of the provider from which libnetwork can fetch all the information to
initialize the internal agent.

The method can be and is called multiple times passing the same value,
with the previous logic that was erroneusly spawning multiple go routines that
were making possiblea race between an agentInit and an agentClose.

The new logic aims to disallow it by checking for the provider passed and
ensuring that if the provider is already present there is nothing to do because
there is already an active go routine that is ready to process cluster events.
Moreover a patch on moby side takes care of clearing up the Cluster Events
dispacthing using only 1 channel to handle all the events types.
This will also guarantee in order event handling because now all the events are
piped into one single channel.

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-05-04 15:35:28 -07:00
Alessandro Boch
8c113c7fe4 Merge pull request #1733 from fcrisciani/memberlist_bump
Updating memberlist to v0.1.0
2017-04-28 10:13:43 -07:00
Flavio Crisciani
552c16dc92 Fix for remote addr parsing
Fix initialization of starting vector

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-04-28 09:10:29 -07:00
Flavio Crisciani
3d7bc23901 Change GetRemoteAddr to return all managers
Change in the provider interface to let the provider
return the whole list of managers.
This will allow the netwrok db to have multiple choice
to establish the first adjacencies

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-04-27 16:58:42 -07:00
Flavio Crisciani
541cafdb30 Vendoring memberlist tag 0.1.0
Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-04-27 13:32:34 -07:00
Madhu Venugopal
1624c61ef2 Merge pull request #1727 from sanimej/cphard
control-plane hardening: Avoid nDB stale entries
2017-04-25 11:04:13 -07:00
Madhu Venugopal
72d0925567 Merge pull request #1724 from aboch/nmd
Make sure sbJoin programming rollback happens on each error
2017-04-25 10:54:22 -07:00
Alessandro Boch
8711829092 Merge pull request #1719 from fcrisciani/data_path
Add the datapath-addr in libnetwork
2017-04-24 13:55:24 -07:00
Santhosh Manohar
1693144ae2 Merge pull request #1713 from aboch/nse
On clusterLeave, notify only if there are peers
2017-04-23 16:31:46 -07:00
Alessandro Boch
1323730eca On send node envents, notify only if there are peers
- Otherwise operation will unnecessarely block
  for five seconds.
- This is particularly noticeable on graceful
  shutdown of daemon in one node cluster.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-04-21 10:19:08 -07:00
Santhosh Manohar
102f9d230d Avoid nDB stale entries because of intermittent nw issues.
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2017-04-19 14:01:28 -07:00
Alessandro Boch
46ebc9613e agentSetup to first check if clusterProvider is nil
- concurrent swarm join and daemon stop seen in
  integration tests may cause agentSetup to access
  a nil clusterProvider, resulting in a panic

Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-04-18 11:34:05 -07:00
Alessandro Boch
b4e5078bd5 Make sure sbJoin programming rollback happens on each error
Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-04-17 10:58:14 -07:00
Flavio Crisciani
a0e0231909 Add the data-path-addr
During configuration in SWARM mode is now possible to pass an additional
parameter --data-path-addr <ip|interface>.
The information is going to be used to configure which is the interface
that is going to be used for the data path for global scope drivers.
Up to now the only driver really using this extra parameter is the
overlay driver.

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-04-14 16:52:40 -07:00
Alessandro Boch
23b43b1557 Remove gw endpoint on gw nw join failure
- Currently if the join fails, the gw endpoint becomes
  stale and stays connected to the gw network.
- Also fix sbJoin to do the cleanup in case
  setupDefaultGW() fails

Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-04-11 17:48:46 -07:00
Santhosh Manohar
630b7a6b41 Merge pull request #1700 from aboch/clr
Sandbox.SetKey() should not reset the osl sandbox on failure
2017-04-10 17:26:58 -07:00
Alessandro Boch
32a19b4ec3 Merge pull request #1704 from sanimej/cphard
control-plane hardening: cleanup local state on peer leaving a network
2017-04-10 16:53:40 -07:00
Alessandro Boch
f95ae18294 Merge pull request #1681 from krasi-georgiev/31610-ingress-sandbox-files-location-with-custom-daemon-root-directory
ingress sandbox hosts and resolve.conf files location didn't respect the custom daemon root directory
2017-04-10 16:39:12 -07:00
Krasi Georgiev
421c089e98 ingress sandbox hosts and resolve.conf files location didn't respect the custom daemon root directory
Signed-off-by: Krasi Georgiev <krasi@vip-consult.solutions>
2017-04-11 00:51:54 +03:00
Alessandro Boch
0c10c6d22f Merge pull request #1648 from tianquan23/remote-doc-typo
Fix typo in remote.md
2017-04-10 14:13:41 -07:00
Alessandro Boch
a941ac9b7d Merge pull request #1712 from fcrisciani/conntrack_8795
Flush conntrack entries
2017-04-10 14:07:49 -07:00
Alessandro Boch
fc4d9bd640 Merge pull request #1616 from chchliang/testnetwork
print name and id infomation  when  has active endpoints
2017-04-10 13:54:44 -07:00
Alessandro Boch
ab0ac83e89 Merge pull request #1670 from timchenxiaoyu/endpointtypo
fix endpoint error
2017-04-10 13:52:27 -07:00
Flavio Crisciani
3684df4a66 Flush container flows in conntrack (Bug #8795)
Flush all the endpoint flows when the external
connectivity is removed.
This will prevent issues where if there is a flow
in conntrack this will have precedence and will
let the packet skip the POSTROUTING chain.

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-04-07 18:30:45 -07:00
Madhu Venugopal
7110d72d03 Merge pull request #1711 from aboch/hns
Do not manage ipv6 for host mode containers
2017-04-07 16:08:39 -07:00
Flavio Crisciani
6f062c298a Vendoring the netlink changes
Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-04-07 15:12:22 -07:00
Alessandro Boch
cddead94d2 Do not manage ipv6 for host mode containers
Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-04-07 14:14:26 -07:00
Santhosh Manohar
da943d8a9b Merge pull request #1709 from aboch/fwd
Remove firewalld running log
2017-04-07 09:43:56 -07:00
Alessandro Boch
e5c1a4cabd Remove firewalld running log
- The info it provides can be found elsewhere
  The logs gets printed too often becasue of
  the programming being done in the tasks

Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-04-06 21:09:49 -07:00
Alessandro Boch
18098ab1c8 Add AgentStopWait method
- to signal when the networking cluster agent is stopped

Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-04-05 11:13:56 -07:00
Akihiro Suda
79bf46fd79 improve error for getStore()
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-04-05 05:37:58 +00:00
Santhosh Manohar
c3036bcc36 Merge pull request #1701 from aboch/clri
Do not clear ingress network in libnetwork
2017-04-04 10:31:22 -07:00
Alessandro Boch
b04b258243 Do not clear ingress network in libnetwork
- Now that docker has the code to release the ingress
  network, have docker do the release on cluster leave
  and on graceful daemon shutdown.
  This is a cleaner approach in line with the cleanup
  triggered by who created the resource and will avoid
  races on ingress network removal as revealed by the
  docker tests.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-03-31 14:00:56 -07:00
Santhosh Manohar
69ad7ef244 control-plane hardning: cleanup local state on peer leaving a network
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2017-03-31 01:49:03 -07:00
Madhu Venugopal
56ae6ff330 Merge pull request #1687 from aboch/rnm
Fix rename for containers on swarm network
2017-03-30 07:32:55 -07:00
Alessandro Boch
34f4304a71 Sandbox.SetKey() should not reset the osl sandbox on failure
Because the failure would not be on creating the osl sandbox
(which is done by somebody else). It would be on the programming
libnetwork does on the osl sandbox. In case of failure just report
the error. External caller will take care of removing the parent sandbox
via the cleanup on the error handling path. Otherwise the osl sandbox
will never be removed.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-03-28 13:17:10 -07:00
chchliang
6e31451d16 print name and id infomation when has active endpoints
Signed-off-by: chchliang <chen.chuanliang@zte.com.cn>
2017-03-24 09:40:27 +08:00
Madhu Venugopal
b670a16ba7 Merge pull request #1684 from huikang/fix-dnet-missspelling
Fix misspelling fmt verb in dnet
2017-03-23 15:30:11 -07:00
Madhu Venugopal
3a9785442e Merge pull request #1690 from YuPengZTE/devWordTypo
Fix typo
2017-03-23 15:29:27 -07:00
Madhu Venugopal
c44eb67aea Merge pull request #1693 from fate-grand-order/typo
fix some misspells in api/api_test.go
2017-03-23 15:28:44 -07:00
Brian Goff
a143df7d99 revendor x/net and gogo/protobuf to match docker/docker
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-03-21 15:47:05 -04:00
Brian Goff
869e907fcf Re-run vndr with latest version
vndr has been updated and now pulls in license files and readmes.
This just re-runs with the latest version so vendoring is up to date.
Should cut down on changes from real vendor commit updates.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-03-21 15:42:30 -04:00
fate-grand-order
9155e456b6 fix some misspells in api/api_test.go
Signed-off-by: fate-grand-order <chenjg@harmonycloud.cn>
2017-03-20 20:40:53 +08:00
Madhu Venugopal
14b64c7e0f Merge pull request #1642 from sanimej/l2miss
Handle kernel's l2miss notification in the overlay driver
2017-03-17 16:11:08 -07:00
Santhosh Manohar
9dc694de18 Always program the kernel state if triggered by l2 or l3 miss
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2017-03-16 18:12:52 -07:00
Alessandro Boch
ed935930b5 Fix rename for containers on swarm network
Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-03-16 14:09:26 -07:00
Santhosh Manohar
539888412b Merge pull request #1689 from aboch/inv
Do not invalidate table event messages
2017-03-16 13:47:01 -07:00
Santhosh Manohar
83837617b4 Handle kernel's l2miss notification in the overlay driver
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2017-03-16 12:17:19 -07:00