Commit Graph

9 Commits

Author SHA1 Message Date
Madhu Venugopal 7cbc3e76f6 Handle endpoint & network object in notifyEvent avoiding id lookup
Join & Leave Serf processing happens in a separate goroutine and there
are cases as in https://github.com/docker/libnetwork/issues/985, it can
cause lookup failures when endpoint delete processing happens before
Serf gets a chance to handle the leave processing.

The fix is to avoid such lookups in this goroutine, but handle the
endpoint and network objects directly.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-03-29 11:19:23 -07:00
Jana Radhakrishnan eef129c103 Do not attempt serf query when not initialized
Sometimes, the vxlan kernel code may generate miss
notifications for vxlan bound packets when serf is
not initliazed. In such cases we should not try
doing a query as it will create a panic. We should
error out which will generate a log message.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-12-03 10:21:43 -08:00
Brian Goff 2f03577ec8 Use serf logger for memberlist log
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-10-28 17:21:53 -04:00
Jana Radhakrishnan 344b653478 Remove unconditional debug logging
There were some unconditional debug logging in serf.
Removed them and made then go through logrus writers
based on what error level the log string contains.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-06 15:29:56 -07:00
Santhosh Manohar 6e327a5afb Support for multiple subnets in a overlay network
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2015-09-29 06:51:01 -07:00
Madhu Venugopal fac4e67c16 serfJoin doesnt happen if self notification comes later
With the recently introduced docker discovery, the self node discovery
notification can reach the overlay driver after the remote node
discovery notification.  In scenarios such as 2 node setup, it seems more
likely. In those scenarios, the serfJoin is not triggered and hence the
neighborship is not formed between the 2 nodes.

The fix is to retain the knowledge of the neighbor and reuse it
immediately after the serfInit is done. Since we do the serfJoin just
once, there is no harm in changing the neighIP to a new value even if it
is not used.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-01 21:50:54 -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
Alessandro Boch fd43ee1323 Introduce Sandbox entity
- Maps 1 to 1 with container's networking stack
- It holds container's specific nw options which
  before were incorrectly owned by Endpoint.
- Sandbox creation no longer coupled with Endpoint Join,
  sandbox and endpoint have now separate lifecycle.
- LeaveAll naturally replaced by Sandbox.Delete
- some pkg and file renaming in order to have clear
  mapping between structure name and entity ("sandbox")
- Revisited hosts and resolv.conf handling
- Removed from JoinInfo interface capability of setting hosts and resolv.conf paths
- Changed etchosts.Build() to first write the search domains and then the nameservers

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-08-27 11:19:02 -07:00
Jana Radhakrishnan 6e4a572529 Overlay driver
This commit brings in the first implementation of
overlay driver which makes use of vxlan tunneling
protocol to create logical networks across multiple
hosts.

This is very much alpha code and should be used for
demo and testing purposes only.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-06-18 15:06:24 -07:00