Commit Graph
2388 Commits
Author SHA1 Message Date
Paul Bellamy af38f07d26 refactoring proxy dns test 2015-06-16 14:08:35 +01:00
Adam Harrison b33d4497fa Fix test broken by new default behaviour 2015-06-16 14:07:42 +01:00
Adam Harrison 03b83811fa Update documentation 2015-06-16 14:07:42 +01:00
Adam Harrison e5b1cc21a9 Smoke test for new weave script DNS behaviour 2015-06-16 14:07:42 +01:00
Adam Harrison fdce84d9d9 New --with-dns/--without-dns behaviour in weave script 2015-06-16 14:07:42 +01:00
Paul Bellamy 8873d69b77 [proxy] Add --without-dns flag, and change meaning of --with-dns flag 2015-06-16 14:07:40 +01:00
Alvaro Saurin a1cb5b16a6 Run the unit tests with GOMAXPROCS=4 2015-06-16 14:58:53 +02:00
Alvaro Saurin 8621aa7cbf Launch WeaveDNS with --debug when DEBUG is set 2015-06-16 14:58:53 +02:00
Bryan Boreham 9a99a51e14 Merge pull request #925 from bboreham/922-remove-dot
Remove trailing dot from hostnames. Fixes #922.
2015-06-16 13:58:12 +01:00
Paul Bellamy bd0aff6a0f Merge pull request #929 from weaveworks/923-fix-deadlock
Fix deadlock in weavedns
2015-06-16 13:31:39 +01:00
Matthias Radestock 25dd60a149 Merge pull request #928 from awh/offset_tcp_nonce
Set high bit in TCP nonce to differentiate from UDP

Fixes #927.
2015-06-16 13:21:09 +01:00
Paul Bellamy 048261c921 Hold lock while accessing mutable variable, but release before sending on chan 2015-06-16 13:06:14 +01:00
Adam Harrison 9149366919 Set high bit in TCP nonce to differentiate from UDP 2015-06-16 12:21:18 +01:00
David Wragg 47d7c22073 Merge rade/871_version_header (PR #920): protocol versioning
Closes #871.
2015-06-16 12:20:40 +01:00
Bryan Boreham 7a106aeb5f Release lock before sending on a channel 2015-06-16 11:44:25 +01:00
Matthias Radestock 3124ffede5 more forward/backward compatible protocol versioning
We now first exchange a very minimal header, consisting of just the
name of the protocol ("weave") and the min and max version (encoded as
a byte each) we support. This leaves all other details of the
protocol, including the contents of of the handshake, open.

Peers agree to communicate using the maximum mutually supported
version. We record this in the LocalConnection, though atm nothing is
making use of that information.

We set a shorter than normal deadline (10s instead of 60s) for the
header exchange, so we detect version mismatches, garbage, or
non-responsive remotes quickly.

We reset the protocol version to '1' since this is a fresh start; old
weaves will not be able to parse the header.

Closes #871.
2015-06-16 11:00:41 +01:00
Bryan Boreham 79db00a90e Strip trailing period from hostname generated from weavedns domain.
We strip at the calling point rather than in the server, because DNS
servers do see the domain as ending with a '.'  representing the root.
2015-06-16 10:26:11 +01:00
Bryan Boreham dd9adf6a65 Don't add a trailing newline to the domain 2015-06-16 10:25:54 +01:00
Matthias Radestock 0206434f62 fix 130_expose_test breakage
introduced by 8ac98f9f6b
2015-06-15 22:25:22 +01:00
Matthias Radestock 657cbaefb9 refactor: simplify dns_args 2015-06-15 21:54:51 +01:00
Matthias Radestock ee61f07d9b refactor: extract rm_containers helper
cherry-picked from #898
2015-06-15 21:41:43 +01:00
Matthias Radestock cba1827d2c Merge pull request #918 from bboreham/916-check-call-weave
Output error message if http call to weave or weavedns fails

Fixes #916.
2015-06-15 21:16:40 +01:00
Matthias Radestock 3d7c18ee70 cosmetic: remove some unnecessary quoting 2015-06-15 21:02:23 +01:00
Matthias Radestock 82c1a58e81 refactor: remove unused weave dns-domain command
and inline dns_domain() function.

Both were introduced in #890.
2015-06-15 19:23:52 +01:00
Matthias Radestock 8ac98f9f6b tiny refactor: replace some 'if's with short-circuit expressions 2015-06-15 18:33:29 +01:00
Bryan Boreham 56e0636b14 Output error message if http call to weave or weavedns fails 2015-06-15 17:58:59 +01:00
Bryan Boreham 6534cc6ae3 Merge pull request #919 from bboreham/915-not-again-again
Fixes #915
2015-06-15 17:06:30 +01:00
Bryan Boreham d25d0810af Extend the 'block' flag to block allocateAgain()
otherwise we can re-insert the entry into the map after a parallel
allocateAgain() has cleared the flag. And it /that/ happens in
parallel with a free() then the data-structure can get out of sync.
2015-06-15 16:51:27 +01:00
Alvaro Saurin ba2f6671a6 Removed a couple of Debug.Printf()s 2015-06-15 17:11:27 +02:00
Alvaro 9284366a3d Merge pull request #917 from bboreham/inercia-flush-sched-queue
Return of the Fix for the zone refresh unit test
2015-06-15 15:45:57 +02:00
Bryan Boreham 7e6a478283 Merge pull request #914 from rade/911_different_gossip_channels
LGTM. Fixes #911
2015-06-15 14:42:22 +01:00
Matthias Radestock e15ebd9118 add unit test for SurrogateGossiper 2015-06-15 14:22:25 +01:00
Bryan Boreham 0ff311356d Flush the background updater goroutines to make tests reliable 2015-06-15 13:48:54 +01:00
Bryan Boreham e49a29197b Add a Flush() routine to synchronize callers 2015-06-15 13:48:24 +01:00
Bryan Boreham 2b7fb699af Clean up a couple of compilation errors 2015-06-15 13:47:01 +01:00
Bryan Boreham f3ad8bd52f Merge branch 'weave-fix-unittest' of https://github.com/inercia/weave into inercia-weave-fix-unittest 2015-06-15 11:51:14 +01:00
Matthias Radestock 36ba838f54 remove ipam.DummyAllocator and rely on new SurrogateGossiper
As a result it is possible to mix nodes with and without IPAM. Note
that the quorum only involves the former, and hence such mixed
environments will typically require a custom `-initpeercount`.
2015-06-15 11:24:07 +01:00
Matthias Radestock dea5bd0639 introduce SurrogateGossiper for dealing with unknown gossip channels
Instead of erroring when we receive gossip for an unknown channel, we
create a GossipChannel on the fly, with a SurrogateGossiper singleton
as the gossiper.

The SurrogateGossiper ignores unicasts and relays broadcasts and
gossip.
2015-06-15 11:23:32 +01:00
Matthias Radestock 0b3584a355 permit encoding of GossipData into multiple messages 2015-06-15 11:14:24 +01:00
Matthias Radestock 94220f22b2 allow dynamic addition of gossip channels 2015-06-15 11:14:24 +01:00
Matthias Radestock ec85da914a simplify dns-add/remove arg checking 2015-06-15 10:34:59 +01:00
Matthias Radestock bfebfecf6c refactor: simplify test router creation 2015-06-15 08:12:35 +01:00
Matthias Radestock e48ec6a35f clean up erroneous comment 2015-06-15 08:03:02 +01:00
Matthias Radestock a844797d67 cosmetic: reduce test noise 2015-06-14 17:48:21 +01:00
Matthias Radestock 72640f1828 refactor: extract helpers for http calls into weave and weavedns 2015-06-14 17:46:56 +01:00
Matthias Radestock 4ce6a76d1f remove outdated piece of docs 2015-06-14 16:36:37 +01:00
Matthias Radestock bf4c75b1cd don't validate -iprange value
We generally don't validate arguments in the script unless we process
them there.
2015-06-14 16:12:53 +01:00
Matthias Radestock 313a95a467 let -iprange "" start the router w/o IPAM 2015-06-14 16:06:20 +01:00
Matthias Radestock 926c85c6ba more idiomatic 'boolean' in shell 2015-06-14 15:48:08 +01:00
Matthias Radestock afb31d3beb cosmetic: remove unused method 2015-06-14 11:49:03 +01:00