Commit Graph
1973 Commits
Author SHA1 Message Date
David Wragg f522f5b730 Ensure we send a gossip update whenever a new connection requires it
Previously, if LocalConnection run() failed before calling
AddConnection, it would not gossip anything. This was benign, because
the peer information we learn in the handshake is just a placeholder
until the full information arrived via gossip, and if a connection is
not formed, there is nothing else to gossip about.

With short ids, there's a corner case where this is no longer true: If
a new peer connects to us, and it has the same short id as we do, then
we might change our short id.  If we do, then it is important that we
gossip that out, even if the attempt to establish the connection fails
further along.
2015-06-12 16:22:13 +01:00
David Wragg bd185abb29 Introduce PeerShortIDs
These are needed to support vxlan encapsulation.  In a vxlan packet,
the only place we can straightforwardly hold the source and
destination peers identifiers used by the weave router is in the
24-bit VNI (vxlan network identifier) field.  This gives us 12 bits to
indicate a peer. The resulting limit of 4096 peers on a weave network
does not seem like a problem in the near future.  But it does mean
that decentralized allocation makes collisions fairly likely even in
weave networks of sizes that are common today.  Fortunately, the
problem is much more tractable than IPAM because we can detect when
collisions occur and take action to resolve them.

TODO: We already notify the InterHost when a short id -> peer mapping
changes, but we also need to flush any entries in the router MAC cache
that might be affected.
2015-06-12 16:22:13 +01:00
David Wragg 203dfbb3e9 Always include local peer in Peers 2015-06-12 16:22:13 +01:00
David Wragg c09f0f7037 Fold ApplyUpdate and applyUpdate together
In order to do "defer peers.Unlock()". ApplyUpdate now does slightly
more work with the lock held, but the difference is modest.
2015-06-12 16:21:16 +01:00
David Wragg a334059e85 Add NewPeerFromSummary
To reduce the number of places that are explicit about which values
go into a new Peer.
2015-06-12 16:12:59 +01:00
David Wragg a9c710211b Notify the InterHost when routes change 2015-06-12 16:12:59 +01:00
David Wragg 0f888e9735 Flows 2015-06-12 16:12:59 +01:00
David Wragg 17c8a16757 Move ICMP frag-needed handling into sleeveForwarder 2015-06-12 16:12:59 +01:00
David Wragg 4e41f649fb Introduce InterHost / sleeve 2015-06-12 16:12:59 +01:00
David Wragg f8ed319428 Don't inspect the DF flag earlier than we need to 2015-06-12 16:12:58 +01:00
David Wragg ef0153cb0f Introduce IntraHost 2015-06-12 16:12:54 +01:00
David Wragg b77abf480b Move DF indication into LogFrame 2015-06-12 16:11:32 +01:00
David Wragg 2fa5cda2c7 Make the full EthernetDecoder available to LogFrame
So that LogFrame can include information about the decoded frame beyond
the ethernet layer.
2015-06-12 16:11:32 +01:00
David Wragg 225e6871e3 Add a comment to Router's Start method 2015-06-12 16:11:32 +01:00
David Wragg 5d2d857dbe Eliminate the GossipSender Start method 2015-06-12 16:11:32 +01:00
David Wragg d7c4bc04d3 Eliminate ConnectionMaker Start method 2015-06-12 16:11:32 +01:00
David Wragg 32b2bcf01b Eliminate the Routes Start method 2015-06-12 16:11:32 +01:00
David Wragg b1308823d2 Eliminate the LocalPeer Start method 2015-06-12 16:11:32 +01:00
David Wragg 0627ade9de Eliminate MacCache Start method 2015-06-12 16:11:32 +01:00
David Wragg 4d0ca39f97 Eliminate the Start method on LocalConnection 2015-06-12 16:11:32 +01:00
David Wragg 8a54af92ef Remove forwarder Start methods 2015-06-12 16:11:32 +01:00
Adam Harrison 93c1e755e6 Add release 0.11.2 to CHANGELOG v0.11.2 2015-06-08 16:31:24 +01:00
Alvaro Saurin 5f4756aa80 Do not overwrite negLocal entries in the cache
Unit tests
2015-06-08 13:53:24 +01:00
Ilya Dmitrichenko 106f1c4434 Respect DOCKER_CLIENT_ARGS in weave run (close #855) 2015-06-08 13:53:24 +01:00
Paul Bellamy 4f86a20824 Add release 0.11.1 to CHANGELOG v0.11.1 2015-06-01 14:26:33 +01:00
Matthias Radestock 49ad336a35 Merge pull request #809 from paulbellamy/0.11
Rewording and clarifying proxy docs for 0.11.1 release
2015-06-01 13:32:28 +01:00
Paul Bellamy 6feaa72abd [docs] elaborating on proxy IPAM and DNS interaction 2015-06-01 13:24:55 +01:00
Paul Bellamy 71d6f9cdfb [docs] re-ordering proxy doc sections 2015-06-01 13:24:52 +01:00
Matthias Radestock 341d5ecbb6 remove out-of-date info from ipam docs 2015-06-01 12:15:14 +01:00
Matthias Radestock 2e208b4921 cosmetic 2015-06-01 12:15:05 +01:00
Matthias Radestock c983d9f39f cosmetic 2015-06-01 12:14:55 +01:00
Matthias Radestock adc5784fc9 expand weavedns example to cover multi-host 2015-06-01 12:14:35 +01:00
Alex Chan a8c3551040 Minor spelling corrections in docs 2015-06-01 12:14:20 +01:00
Matthias Radestock 3332f94a00 Merge pull request #801 from bboreham/787-better-status
Improve ipam status message before and after pending consensus

Fixes #787.
2015-06-01 11:17:19 +01:00
Bryan Boreham cd1cca3df2 Reformat output of pending ipam requests 2015-06-01 10:55:01 +01:00
Matthias Radestock 158fb36c8c Merge remote-tracking branch 'upstream/0.11' into 0.11 2015-05-31 11:54:08 +01:00
Matthias Radestock 5f385a297c remove bashism
This was introduced in #780.
2015-05-31 11:51:34 +01:00
Bryan Boreham 1d6f1f7561 Improve ipam status message before and after pending consensus 2015-05-29 17:34:17 +01:00
Matthias Radestock 1769cdad7c Merge pull request #799 from paulbellamy/proxy-attach
Proxy kills container and returns error when attach fails

Fixes #788.
2015-05-29 16:35:25 +01:00
Paul Bellamy 4f73ef73bb weavewait should exit if it times out
To match behaviour of proxy when interface fails to attach
2015-05-29 14:37:58 +01:00
Paul Bellamy 0cb2e80e09 Proxy kills container and returns error when attach fails 2015-05-29 14:37:33 +01:00
Matthias Radestock 10a9f58d13 Merge pull request #780 from paulbellamy/proxy-launch-2
simplifying and standardizing `launch-proxy`

Fixes #767. Fixes #755. Closes #757.
2015-05-29 13:30:30 +01:00
Paul Bellamy f919ef12d0 fix bug with WEAVEPROXY_DOCKER_ARGS not being passed through 2015-05-29 09:52:43 +01:00
Paul Bellamy 20c9bc04a7 simplifying and standardizing launch-proxy 2015-05-29 09:52:42 +01:00
Bryan Boreham 10c3f47bd1 Merge pull request #783 from bboreham/782-space-panic
Fixes #782
2015-05-29 09:42:44 +01:00
Bryan Boreham 915bf392e9 Improve error reporting of too much free space 2015-05-28 18:15:04 +01:00
Bryan Boreham af5531cbf6 Fix incorrect calculation of free space
when granting a range that spans a token and inserting a new token, the
free space on the last token that we are handing over has to change.
Add unit test for this too.
2015-05-28 18:12:30 +01:00
Matthias Radestock 32c35da402 Merge pull request #777 from paulbellamy/proxy-versionless
allow proxy to intercept unversioned (i.e. 1.0) urls

Closes #770. Closes #778.
2015-05-28 17:19:46 +01:00
Paul Bellamy 147c7f503c add curl test for proxy v1.0 api support 2015-05-28 16:39:32 +01:00
Paul Bellamy c8b95a2527 fix bug in proxy handling of minimal request bodies 2015-05-28 16:24:04 +01:00