Commit Graph
1078 Commits
Author SHA1 Message Date
David Wragg 3c093d7534 Make build.sh show its progress 2015-02-10 16:27:10 +00:00
David Wragg a31b115b06 Add 'build' makefile target 2015-02-10 16:27:06 +00:00
David Wragg 23233851db Support non-containerized WEAVETOOLS_EXES build 2015-02-10 16:05:54 +00:00
Matthias Radestock 08c34e4bb9 refactor: rename a method 2015-02-01 19:25:31 +00:00
Matthias Radestock b43e5debb1 gofmt 2015-02-01 16:50:43 +00:00
Matthias Radestock 2d135f3da0 prevent premature peer gc
Caused by a race between adding the connection to our map and
receiving a topology gossip on it.

We remove the race by making AddConnection synchronous and invoking it
prior to entering the tcp receive loop.

Fixes #367.
2015-01-31 22:29:07 +00:00
Matthias Radestock 5892cae5d0 set the hostname on the test VMs
which makes it easier to see where you are when ssh'ed in
2015-01-31 17:12:20 +00:00
Matthias Radestock 5967d5de20 make it easier to set up more than 2 VMs for testing 2015-01-31 16:55:45 +00:00
Matthias Radestock 8f18df7a43 cosmetic: improve comment 2015-01-31 11:38:29 +00:00
Matthias Radestock 2dee5abccc cosmetic 2015-01-31 11:35:46 +00:00
Matthias Radestock 65d0c8b4ce log unknown peer received in topology gossip 2015-01-31 11:31:45 +00:00
Matthias Radestock de45a85162 tweak error handling in topology update application
- simplify
- abort early
2015-01-31 10:35:36 +00:00
rade 99770c564b Merge pull request #377 from sttts/expose-hide-without-ethtool
Also avoid calling ethtool in expose and hide
2015-01-29 23:26:30 +00:00
Matthias Radestock bb134154a8 banish non-posix sed regexps
Fixes #371.
2015-01-29 21:39:11 +00:00
Bryan Boreham d354f4bea4 Merge pull request #376 from rade/372_udp_connectivity_check
LGTM. Fixes #372
2015-01-29 13:24:21 +00:00
Matthias Radestock c1dd2e3a09 tear down connections that have no (initial) udp connectivity
Prior to the introduction of gossip, a tcp connection would not see
regular communication until it had been marked as 'established',
because the topology communication scheme would periodically send
'FetchAll' only after that. So in the absence of udp connectivity we'd
time out. The timeout could of course occur for other reasons, namely
disrupted tcp connectivity, but the combination of a timeout and 'not
established' pointed to a lack of udp connectivity as a likely
cause. So that's what we checked for.

In the new gossip-based topology communication, however, gossip (of
anything, not just topology) occurs as soon as we have tcp
connectivity. Therefore we will no longer encounter a timeout when
just udp connectivity is disrupted. Which makes our check invalid.

So instead we introduce a one-shot timer, created on handshake
completion and cancelled when we mark the connection as
'established'. When the timer fires, and the connection still hasn't
been established, we shut down the connection with an error indicating
lack of udp connectivity.
2015-01-29 12:41:52 +00:00
Dr. Stefan Schimanski d77e3a4c22 Also avoid calling ethtool in expose and hide
Those two commands are used in the pre-docker phase when you setup your
weave bridge using create-bridge, e.g. inside /etc/network/interfaces.
2015-01-29 13:21:49 +01:00
Matthias Radestock 17f6653cae cosmetic: var name consistency with Routes.calculateBroadcast 2015-01-27 20:53:56 +00:00
Matthias Radestock d88c12caa7 improve peer gc efficiency
Instead of separately calculating routes to every individual peer,
carry out one calculation for routes to all peers. Same as unicast
routes except taking into account asymmetric connections.
2015-01-27 20:33:13 +00:00
Matthias Radestock 6c934f1cd3 cosmetic: reorder some LocalPeer methods to match typical lifecycle 2015-01-27 18:11:42 +00:00
Bryan Boreham ae0e3306d7 Merge pull request #313 from bboreham/add_gossip
Gossip layer to communicate topology between peers

Note that I have squashed over 100 commits from @bboreham and @rade into the three for this PR; you can see the original history at https://github.com/bboreham/weave/compare/add_gossip_full
2015-01-27 15:37:35 +00:00
Bryan Boreham 4647c36a15 Unit tests for gossip-based topology communication 2015-01-27 12:45:40 +00:00
Bryan Boreham 5dc9b085a0 Replace previous topology communication with gossip-based mechanism 2015-01-27 12:45:40 +00:00
Bryan Boreham 18df01a4bf Basic gossip implementation 2015-01-27 12:45:40 +00:00
Bryan Boreham c80bff473f Simplify DeleteTestConnection along the same lines as AddTestConnection 2015-01-26 14:03:32 +00:00
Michael Bridgen 08eb90c938 No longer is local_ip welcome in weaveDNS
(and point at weaveDNS's readme rather than the blog post, which is
out of date)
2015-01-26 11:49:02 +00:00
Matthias Radestock 1efaac62bf Merge remote-tracking branch 'upstream/master' 2015-01-25 12:33:36 +00:00
Matthias Radestock 824286d382 shrink "improved" topology update
When an update contains an older version of a peer we know about,
there is no point in including our better version in the "improved"
update, since we will have told our neighbours about that already and
any race conditions are taken care off by the periodic sending of the
complete topology.
2015-01-25 12:27:45 +00:00
Matthias Radestock af6e5c3438 move more of the topology docs into their own section
and some cosmetics
2015-01-25 12:21:02 +00:00
Matthias Radestock fc85e12556 push more of the topology docs into the topology section
plus some cosmetics
2015-01-25 12:17:50 +00:00
Matthias Radestock 13fc0bf720 add some tests for Peers
extracted from #313
2015-01-24 10:56:44 +00:00
Matthias Radestock b137f3b639 oops 2015-01-24 10:37:03 +00:00
Matthias Radestock 55f55a59bc refactor: promote connection lifecycle methods from LocalPeer to Peer
They are sufficiently generic, and having them on Peer is useful for
testing.
2015-01-23 20:04:09 +00:00
Matthias Radestock 1dde9bfe0b cosmetic 2015-01-23 16:58:59 +00:00
Matthias Radestock 0c02e0ac12 Merge remote-tracking branch 'upstream/master' 2015-01-23 16:27:10 +00:00
Matthias Radestock 4cb306e714 refactor: eliminate dependency of Peers on MacCache 2015-01-23 16:24:41 +00:00
rade 1926bc7b71 Merge pull request #357 from errordeveloper/split-create-bridge-command
Add create-bridge command
2015-01-22 18:37:00 +00:00
Ilya Dmitrichenko dfd7d0fe54 Add create-bridge command 2015-01-22 18:04:22 +00:00
Matthias Radestock 86c5e22fa8 another assert 2015-01-22 16:43:07 +00:00
Matthias Radestock 3baa3c09a4 revamp error handling on tcp connection receive loop
- treat crypto decoding errors as errors instead of warnings
- introduce helper for handling protocol messages
- put conn.Shutdown in one place
2015-01-22 16:21:48 +00:00
Matthias Radestock 6253be6ecf cosmetic: nuke stray whitespace 2015-01-22 14:49:00 +00:00
Matthias Radestock 8af2a1c25d refactor: make tie breaking part of the Connection interface
and thus eliminate all knowledge of LocalConnection from the
LocalPeer.handle* methods
2015-01-21 21:44:22 +00:00
Matthias Radestock 99525ebf85 refactor: LocalConnection.CheckFatal be gone!
use Shutdown instead, which is in the Connection interface, thus
further reducing dependency on LocalConnection.
2015-01-21 21:23:59 +00:00
Matthias Radestock 9a27299562 cosmetic: consistent method order 2015-01-21 20:55:51 +00:00
Matthias Radestock fe07a41dc3 refactor: make LocalConnection uid 'private'
which makes sense now that we've abstracted tie breaking
2015-01-21 20:46:45 +00:00
Matthias Radestock 9302105a2e refactor: abstract away connection tie breaking
So we don't need to carry that logic in LocalPeer
2015-01-21 20:42:27 +00:00
Matthias Radestock 6efa794ab4 some testing improvements
- show complete call stack of failures (this does include some of the
  testing machinery, but a) is simple, and b) is guaranteed to not
  miss important stack frames)
- add helper to run test with a timeout
- add AssertEqualuint64
2015-01-21 18:45:37 +00:00
Bryan Boreham b7b5fd3dd2 Merge pull request #356 from rade/forgive_protocol_decoding_errors
LGTM.
2015-01-21 17:54:07 +00:00
Matthias Radestock 04f9fab78b don't ignore EOF when decoding peer connections
Even when  there are no connections,  we still expect the  decoding to
succeed.
2015-01-21 17:44:54 +00:00
Matthias Radestock f5a9f07026 forgive all protocol decoding errors
log an error and close the connection, instead of blowing up
2015-01-21 15:01:43 +00:00