Commit Graph
1236 Commits
Author SHA1 Message Date
rade 39e7871cf7 Merge pull request #472 from bboreham/master
Add peer nickname to JSON status
2015-03-19 12:15:16 +00:00
Bryan Boreham 3fbb6eaa8d Add peer nickname to JSON output 2015-03-19 11:34:01 +00:00
rade 6b64516ede Merge pull request #465 from awh/237_add_dns_to_weave_status
Include weave dns information in `weave status`

Closes #237.
2015-03-18 22:21:11 +00:00
Adam Harrison fcab4ee239 Truncate container IDs to twelve characters 2015-03-18 17:56:58 +00:00
Adam Harrison 2e7c281b46 Weave status returns success irrespective of whether router or DNS up 2015-03-18 16:46:51 +00:00
Adam Harrison 6c5dbe0d01 Address documentation comments 2015-03-18 14:57:29 +00:00
Adam Harrison 0005715b1a Weave status only returns success if both router and DNS are up 2015-03-18 14:49:48 +00:00
Adam Harrison 66f4fd94e3 Update documentation 2015-03-18 13:39:16 +00:00
Adam Harrison 0aa36cf8d0 Try to get weaveDNS status even if router container is missing 2015-03-18 13:39:08 +00:00
Adam Harrison d23a6c86c3 Merge branch 'master' into 237_add_dns_to_weave_status
Conflicts:
	nameserver/http.go
2015-03-18 11:58:39 +00:00
rade e15f52b4cb Merge pull request #468 from awh/gorilla_mux
Replace hand parsing and validation of URLs with Gorilla mux
2015-03-18 11:48:14 +00:00
Adam Harrison bae6865e33 Rename URL parameter 2015-03-18 11:45:04 +00:00
Adam Harrison bd7b232663 Replace hand parsing and validation of URLs with Gorilla mux 2015-03-18 10:10:13 +00:00
Adam Harrison 8f675f15c0 Revert Gorilla mux introduction 2015-03-17 17:52:39 +00:00
Adam Harrison 0f492b563e Fix test compilation
Tests weren't compiling due to change of ListenHttp() signature. Fixed
for now by reintroducing domain parameter in addition to server, as this
allows the HTTP tests to pass in a nil server parameter. In the long
term DNSServer should probably become an interface so we can mock it
easily in such a scenario.
2015-03-17 17:42:16 +00:00
Matthias Radestock d5eb76f32e replace Peer.ForEachConnection with Peer.Connections
The former is prone to triggering deadlocks since the lock is held on
the peer during the iteration.
2015-03-17 16:24:19 +00:00
Adam Harrison c36543a247 Include DNS server config in status 2015-03-17 15:41:01 +00:00
Matthias Radestock 08a08be370 cosmetic 2015-03-17 15:11:28 +00:00
Adam Harrison 6f57774d15 Include zone records in status 2015-03-17 15:02:09 +00:00
Adam Harrison 50f6402774 Include DNS version and domain in status 2015-03-17 14:28:26 +00:00
Adam Harrison 9cf7da7277 Modify weave status to include DNS information 2015-03-17 14:03:18 +00:00
Adam Harrison 9ce26e6973 Replace hand parsing and validation of URLs with Gorilla mux 2015-03-17 13:49:26 +00:00
Bryan Boreham 8f139bcb52 Merge pull request #461 from rade/454_send_all_gossip_to_new_peers_only
LGTM.  Fixes #454
2015-03-17 13:47:49 +00:00
Matthias Radestock dbc683f891 send all gossip to new peers only
Weave sends all gossip down new connections. We do this so that new
peers learn about all gossip'ed information quickly, thus enabling
them to process subsequent incremental updates. In particular, for
topology gossip it ensures that the remote peer learns about all other
peers. This ensures that the incremental update, which is sent as a
result of the new connection getting established and which may
reference a number of other peers, can be processed.

So the intent really is to send all gossip to new peers. But what we
actually do is send it down every new connection. Not every new
connection is from a new peer. In fact most connections aren't. Hence
the current approach is wasteful.

To fix this we need a conservative detection of new peers, i.e. it is
preferable to have false positives. This contrasts with existing logic
in the handshake code. The criteria we use is whether our peer has a
unicast route to the other peer. That is only the case when there is a
continuos chain of symmetric, established connections. The
establishment of these connections should have triggered the sending
of all gossip to the other peer. So we don't need to send it ourself.

Fixes #454.
2015-03-16 17:46:01 +00:00
Adam Harrison 8f8719c298 Correct typo in log message 2015-03-16 17:36:56 +00:00
Matthias Radestock a85d447f01 Merge branch 'dpw-441_slow_arp_fixes'
Fixes #441.
2015-03-16 15:33:41 +00:00
Matthias Radestock 2369b43c8d cosmetic: move new funs to 'right' place 2015-03-16 15:33:05 +00:00
Matthias Radestock c77a7032db Merge branch '441_slow_arp_fixes' of https://github.com/dpw/weave into dpw-441_slow_arp_fixes 2015-03-16 15:31:59 +00:00
David Wragg 4dcf77c210 Commentary 2015-03-16 15:12:44 +00:00
David Wragg 39011a5218 Don't clean up the container interface after moving it into the netns
The most likely cause of failure is the container going away, in which.
case we don't need to clean up.  And there are other points of possible
failure in the same category in attach(), so making sure we clean up the
container interface under all conditions is a  broader issue.
2015-03-16 15:12:44 +00:00
David Wragg e844753a21 Don't duplicate ARP cache configuration 2015-03-16 15:12:44 +00:00
David Wragg 78b0a57007 Send an unsolicited ARP response when a container attaches
Using arping, which is part of the iputils package and so seems to
be ubiquitous.
2015-03-16 15:12:44 +00:00
David Wragg 9b62bcb75d Don't need to use sed to get the IP address part of a CIDR 2015-03-16 15:12:44 +00:00
David Wragg 7a8a7010e2 Refactor for uniform handling of CIDRs
Not quite a pure refactoring because it adds a missing
'validate_cidr'.
2015-03-16 15:12:44 +00:00
David Wragg 11af544071 Configure ARP cache to react more quickly to MAC address changes
When an IP address was reused by a new container, other containers
could experience delays of many seconds the first time they tried to
talk to that new container before successful communication would
occur.  This delay came from three sources related to ARP cache
behaviour:

- The kernel would take a while to decide that an ARP mapping was
  stale due to lack of positive evidence (due to the
  base_reachable_time default of 30s)

- Even once an ARP mapping was considered stale, the kernel would wait
  a few seconds before sending an ARP request, in the hope that a
  higher layer (e.g. TCP) would confirm the ARP entry (due to the
  delay_first_probe default of 5s)

- When the kernel sent out an ARP request to update a stale entry,
  initial attempts would unicast the request to the old MAC address
  before resorting to broadcast (due to the ucast_solicit default of
  3)

This change reduces all these values, so that any delays
are a few seconds.

For most workloads, this should not greatly increase the amount
of ARP traffic, because communication via TCP is often sufficient
to confirm ARP entries.  And one unicast ARP request is still sent
just in case.

Unfortunately, there's a fixed-but-only-recently bug in the kernel
that means that changing base_reachable_time can take a while to take
effect:
<https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4bf6980dd0328530783fd657c776e3719b421d30>.
This means that a container will continue to use a long reachable_time
delay for the first few minutes of its life.
2015-03-16 15:12:27 +00:00
Michael Bridgen 3c1075459f Switch VirtualBox DNS proxying and host resolver off
While those helped with some issues, the proxying is substantially
broken and the smoke tests wouldn't pass.
2015-03-16 15:06:30 +00:00
rade d65d4776da Merge pull request #459 from tomwilkie/master
Typo in sites page for building weave
2015-03-16 15:03:07 +00:00
Tom Wilkie 475a90bcdd Typo in sites page for building weave 2015-03-16 14:45:51 +00:00
David Wragg e8ed9c707d Refactor 2015-03-16 10:46:24 +00:00
Michael Bridgen 9eeec2fa48 Restore use of DNS from Vagrant VMs
These incantations are said to fix DNS on Vagrant VMs running with a
private network.
2015-03-12 14:39:25 +00:00
Bryan Boreham cce6175a5c Merge pull request #453 from rade/452_only_broadcast_on_established
LGTM.  Fixes #452 - those messages go away entirely in my tests.
2015-03-12 11:27:34 +00:00
rade 0d5562a5b6 Merge pull request #451 from bboreham/448_reduce_conns
Avoid many pointless connection attempts

Fixes #448.
2015-03-11 14:04:25 +00:00
Bryan Boreham 8e274328b6 Do try standard port on inbound connections 2015-03-11 14:01:43 +00:00
Bryan Boreham d87e13b999 Re-order Connection fields more consistently 2015-03-11 14:01:07 +00:00
Matthias Radestock 1ceb041bc5 exclude non-established connections from broadcast routing
We already excluded such connections from unicast routing.

Fixes #452.
2015-03-11 13:26:40 +00:00
Bryan Boreham 89fce7f98a Add an 'outbound' field on each connection,
and only attempt new connections to the remote side of outbound connections.
2015-03-11 11:56:47 +00:00
Matthias Radestock 6f89ead9bd log all connection lifecycle events on local peer
There were situations, such as deleting another connection as result
of it losing a tie-break, where lifecycle events of connections on the
local peer weren't logged.

Fixing that entails moving the logging closer to (i.e. right after)
the state change action. This in turn requires promotion of logging to
the Connection interface instead of it LocalConnection. Which in turn
requires a change from 'log' to 'Log', for consistency with other
interface methods.

Fixes #449.
2015-03-10 14:42:18 +00:00
Matthias Radestock 123e8bbb28 reduce likelihood of IP clashes in tests & examples
by using the 10.2 range, which is not one used by docker and also is
less likely than 10.0 to be used by something else.

Fixes #402.
2015-03-09 20:51:26 +00:00
Matthias Radestock abb1c6c781 refactor(ish): push down some error handling in router 2015-03-06 14:51:39 +00:00
rade 0f7f49d3be Merge pull request #433 from dpw/419_broadcast_frametoobigerror
Do not inject ICMP "fragmentation needed" for broadcast packets.

It's a contravention of RFC1122 and also breaks weave routing due to producing packets with broadcast addresses as the source.

Fixes #419.
2015-03-06 14:37:10 +00:00