Bryan Boreham
503546d2a9
Return DNS no-error with empty answer if we have a matching name
...
but the query is for a record type we don't support.
2016-05-03 17:33:51 +01:00
Bryan Boreham
487392b99c
Immediately broadcast DNS records that "re-assert a peer's authority"
...
and enable test to check.
2016-04-06 13:35:07 +01:00
Matthias Radestock
ead3518b4b
make DNS tombstoning idempotent
...
so we avoid the unnecessary gossip, and delayed convergence, that
otherwise ensues.
2016-04-04 20:34:01 +01:00
Matthias Radestock
b080224072
Merge branch '1.4'
2016-03-22 16:28:53 +00:00
Matthias Radestock
537868008f
make linter happy
2016-03-22 16:28:25 +00:00
Matthias Radestock
63a9f879fb
Merge branch '1.4'
2016-03-22 14:13:24 +00:00
Bryan Boreham
38a79b7f59
Pick entry with newer tombstone to merge
2016-03-22 12:57:07 +00:00
Bryan Boreham
010766fe9e
Check entries claiming to originate from us against our current data, and override if necessary
2016-03-22 12:57:07 +00:00
Bryan Boreham
001322751f
Don't hold Nameserver lock over call out via isKnownPeer
2016-03-21 11:52:13 +00:00
Matthias Radestock
6e4f025d9c
refactor: reduce duplication in nameserver logging
...
and remove a dot import in the process
2016-03-20 08:19:15 +00:00
Matthias Radestock
09cd9e091a
Merge branch '1.4'
2016-02-16 14:09:06 +00:00
Matthias Radestock
17d53af2a2
improve logging of dns entry creation
...
- log inside the lock, so we get proper serialisation
- include the container name, so we can identify the specific entry
2016-02-16 14:04:34 +00:00
Peter Bourgon
0dff2e66c6
vendor: update mesh
...
Now, broadcast operations cannot fail. So, update various broadcast-y
methods to no longer return errors.
2016-01-28 10:43:32 +01:00
Peter Bourgon
e27b320ede
Update import location for mesh
2016-01-15 15:57:01 +01:00
Bryan Boreham
b2b293a8ee
Added 'ContainerDestroyed()' callback from docker client
2016-01-12 14:38:44 +00:00
Matthias Radestock
1374e4c4de
ditch RunWithTimeout test helper
...
It breaks stack traces on failure.
We can just rely on running `go test -timeout ...` instead, which we
already do in tools/test.
2015-12-09 13:20:57 +00:00
Adam Harrison
8a4f038ec4
Merge pull request #1662 from weaveworks/issues/1571-upstream-dns-report
...
DNS upstream servers report
2015-11-25 16:47:14 +00:00
Matthias Radestock
b5a4aefe8b
never broadcast empty nameserver gossip
2015-11-19 18:28:37 +00:00
Alvaro Saurin
7992bf4177
DNS upstream servers report
2015-11-19 14:54:23 +01:00
Matthias Radestock
1500b1dc00
refactor: extract nameserver GossipData.copy
...
and remove a self-evident comment
2015-11-18 11:30:40 +00:00
Matthias Radestock
3cd199e852
make GossipData immutable
...
The same piece of GossipData can be shared and subject to different
Merge operations. We either need to copy the data when we share it, or
create copies on modification, i.e. copy-on-write.
We choose the latter, since it is more efficient and there is just one
mutating operation.
Fixes #1697 .
2015-11-17 20:13:46 +00:00
Matthias Radestock
dc9f8762ca
move generic communication substrate into its own 'mesh' package
...
This is mostly a matter of moving some files, changing package names,
changing some imports, and changing some type references.
We duplicate the odd constant & global var, and the intmac/macint
functions, since neither 'router' or 'mesh' nor, really,' common' are
a natural home for them.
2015-11-09 16:37:39 +00:00
Adam Harrison
abc653c87d
Fix merge breakage
2015-11-03 10:13:43 +00:00
Matthias Radestock
30a128c00b
Merge branch '1.2'
2015-11-02 20:58:15 +00:00
Bryan Boreham
b80c1343c3
Take steps to avoid the test timing out
2015-11-02 20:40:17 +00:00
Bryan Boreham
e5c5fbcea3
Hold on to the lower-case version of a hostname, rather than re-computing it every time
2015-11-02 20:40:05 +00:00
Bryan Boreham
fc7d04ce73
Condense Entries unit tests with helper function
2015-11-02 20:03:10 +00:00
Bryan Boreham
35f57b3ed2
Move decoding code next to encoding code
2015-11-02 20:01:40 +00:00
Bryan Boreham
ed9ade05ea
Improve merge asserts
2015-11-02 20:01:40 +00:00
Bryan Boreham
f485b729bc
Hold all entries sorted case-insensitively until just before sending, when we re-sort case-sensitively in Encode()
2015-11-02 20:01:40 +00:00
Bryan Boreham
64f7953423
Add unit test to check outbound mixed-case merging
2015-11-02 20:01:40 +00:00
Bryan Boreham
fc1d837501
Extend unit test to cover mixed-case hostnames and daisy-chained gossip;
...
reduce mock gossip timer to 2 seconds to trigger more often during tests.
2015-11-02 20:01:40 +00:00
Matthias Radestock
6a238818da
Merge branch '1.2'
2015-11-02 19:58:37 +00:00
Matthias Radestock
9800c43bfa
refactor(ish): don't use reference in method that doesn't modify
2015-11-02 19:57:17 +00:00
Adam Harrison
c3a53a6ec5
Merge remote-tracking branch 'upstream/1.2'
2015-11-02 15:21:06 +00:00
Adam Harrison
f64f63f675
Handle truncated responses from upstream servers
2015-11-02 15:00:02 +00:00
Adam Harrison
f0fb44f6d4
Update unit test for miekg DNS API change
2015-11-02 13:24:04 +00:00
Matthias Radestock
12f5ec40b5
refactor: reduce coupling of nameserver to router
...
The nameserver no longer knows anything about router.Peers and
router.Peer. That only leaves PeerName, Gossip and GossipData.
2015-10-29 23:21:07 +00:00
Adam Harrison
7408f72de2
Check weaveDNS subdomain on REST PUT
2015-10-27 14:37:57 +00:00
Matthias Radestock
14a5c12404
allow router to be run w/o access to Docker
...
Fixes #1443 .
2015-10-03 17:52:57 +01:00
Tom Wilkie
357174e351
DNS lookups should not be case sensitive.
...
- On-the-wire gossip messages are sorted case sensitive, but in memory they are sorted case-insensitive.
- Add test for case insensitive match on multiple names.
2015-10-01 12:19:49 +00:00
Matthias Radestock
725f99ea4c
Merge branch '1.1'
2015-10-01 08:23:52 +01:00
Tom Wilkie
11d93b1883
Fix races in TestRecursiveCompress
2015-09-30 15:51:07 +00:00
Bryan Boreham
81e8ba223f
Do network attach on docker event rather than intercepting start and restart commands.
...
This means it also works when the docker daemon restarts a container.
2015-09-01 17:48:12 +01:00
Matthias Radestock
6655974ef3
cosmetic: tidy up log messages
2015-08-28 09:12:42 +01:00
Tom Wilkie
46363f4129
Make reverse dns lookups honor tombstones.
2015-08-25 12:01:09 +00:00
Tom Wilkie
db2e7e4ba1
Merge pull request #1355 from weaveworks/1343-docker-bridge-in-resolv-conf
...
Pass docker bridge ip to dns server, and filter it out of upstream dns ips.
2015-08-25 09:48:06 +01:00
Tom Wilkie
58ae0cd113
Pass docker bridge ip to dns server, and filter it out of upstream dns ips.
2015-08-24 16:00:26 +00:00
Tom Wilkie
4809c113b3
Update comment.
2015-08-24 15:43:31 +00:00
Tom Wilkie
8516ab7c69
Unify logic to tell if DNS response is too big.
2015-08-21 12:39:12 +00:00