Tom Wilkie
9131b46263
Flush gossip messages after each turn, to ensure there isn't a build up of pending messages.
2015-07-20 14:36:40 +00:00
Tom Wilkie
4e29dba5cd
Make Gossip DNS reject gossip messages if clockskew > tombstoneTimeout / 2
2015-07-20 13:12:07 +00:00
Tom Wilkie
1a4b38a10c
Don't delete all the non-tombstone entries every 10mins!
2015-07-20 12:03:46 +00:00
Tom Wilkie
9ab2da8deb
Add GET /name handler to return all dns entries (including tombstones) for debugging.
...
Also, make Address marshall into json as an IP string, not a number.
2015-07-20 12:03:33 +00:00
Matthias Radestock
66473e6021
refactor: return slice instead of pointer to slice from tombstone()
2015-07-20 12:37:54 +01:00
Tom Wilkie
a3d32068d2
Correctly stop the test gossip router to prevent complaints of data races in subsequent tests.
2015-07-17 13:48:39 +00:00
Tom Wilkie
25c9180fdf
Don't swallow errors in the docker client.
2015-07-17 12:35:12 +00:00
Tom Wilkie
66e58937ca
Make nameserver.checkAndPanic look for dups, call it more often.
2015-07-17 10:19:25 +00:00
Tom Wilkie
e2deff09a6
Nameserver: log when peer goes away.
2015-07-17 09:36:44 +00:00
Tom Wilkie
73210b6a70
Make sure DNS Gossip converges correctly.
...
- Abide by gossip interface (return nil, not empty gossip) so gossip converges!
- Make sure we don't say an old entry version is new to us; add some more tests.
- Add dns test for 3 (or N) hosts
- Extend mock gossip router to ensure reconsumption off diffs yield nil
- Don't increment version when re-adding existing entry.
2015-07-15 15:54:52 +00:00
Matthias Radestock
52d3bcfe8b
Merge pull request #1149 from weaveworks/1118-respond-late-paxos
...
Respond to paxos messages when we already have a ring
Fixes #1118 .
2015-07-15 13:24:40 +01:00
Bryan Boreham
acf13dc157
Add sender to OnGossipBroadcast()
2015-07-15 12:07:56 +01:00
Tom Wilkie
91395d6728
Use Msg.Copy!
2015-07-15 11:05:36 +00:00
Tom Wilkie
fa73240812
Copy dns requests and give them a fresh id when doing recursive queries.
2015-07-14 16:44:21 +00:00
Tom Wilkie
361ed1b4a6
Resolve unqualified domains in the weave.local domain.
2015-07-14 16:05:41 +00:00
Tom Wilkie
8b061fd555
Gossip-based DNS embedded in the router.
...
- Nameserver holds a sorted list of (hostname, peer, container id, ip) tuples.
- Entries are gossiped using topology gossip / broadcast - only new/updated entries
are propogated as expected.
- Entries for a given peer are removed when the connection to the peer is lost.
- Entries are tombstoned when containers die. Tombstones are kept for 10mins,
as they do not need to survive partition, only gossip propagation delay.
2015-07-14 16:00:38 +00:00
Tom Wilkie
01f7201a9e
Remove legacy WeaveDNS code.
2015-07-14 16:00:28 +00:00
Matthias Radestock
18032015b9
Revert "Resolve unqualified names in the local WeaveDNS domain"
2015-07-14 16:06:05 +01:00
Alvaro Saurin
efb0ead9ad
Resolve unqualified names in the local WeaveDNS domain
...
Unit tests
2015-07-14 10:46:41 +02:00
Matthias Radestock
6596c8b1a7
make container aliveness check part of the ipam & dns API
...
...rather than conducting it implicitly when an ID "looks like" a
container ID.
Closes #971
2015-07-04 19:13:13 +01:00
Bryan Boreham
ff2d7451e2
Remove -debug option, superceded by --log-level
2015-07-04 03:27:07 +01:00
Bryan Boreham
a5ddb63fca
Remove Info.Print in favour of Log.Info
2015-07-01 14:01:45 +01:00
Bryan Boreham
d82578d895
Replace logging calls with new style
2015-07-01 12:26:23 +01:00
Bryan Boreham
c786e7eb5a
Switch from basic logger to logrus
2015-07-01 12:26:23 +01:00
Matthias Radestock
312122e1be
fix typo
2015-07-01 10:30:12 +01:00
Bryan Boreham
565454d3cb
fixed Logf format specifier
2015-06-26 17:22:35 +01:00
Paul Bellamy
cdee7a5d6f
Replacing custom testing helpers with testify, where possible
2015-06-17 16:58:03 +01:00
Bryan Boreham
9636675c2c
Split part of DNSServer.Start() to a separate ActivateAndServe()
...
Specifically, move the part that blocks, and call that as necessary.
This means Start() can run on the caller's goroutine and avoid race conditions.
2015-06-17 11:35:53 +01:00
Bryan Boreham
90fb201a51
Copy the DNS entry going into the cache, to avoid races.
...
The shuffleAnswers() call ends up acting on the same data,
so it seems simplest to resolve ownership arguments by copying.
2015-06-17 11:35:01 +01:00
Bryan Boreham
657133db50
Move the counting of results from DNS goroutine to test goroutine to avoid race-condition
2015-06-17 11:35:01 +01:00
Bryan Boreham
e68364cb3b
Don't overwrite recvChan; it just creates a race condition
2015-06-17 11:35:01 +01:00
Bryan Boreham
1f92ae6ba8
Swap the order in which two goroutines are started, since one relies on the other.
2015-06-17 11:35:01 +01:00
Bryan Boreham
a6bebd85ed
Remove 'running' member that triggers a race warning and isn't necessary.
2015-06-17 11:35:01 +01:00
Matthias Radestock
cfe14ff568
Merge pull request #943 from inercia/weave-941
...
make negative TTL default to same value as TTL
Fixes #941 .
2015-06-17 10:23:41 +01:00
Matthias Radestock
cf5d8874b6
Merge pull request #937 from inercia/weave-934
...
Ignore empty queries (sent when the server is being shut down)
Fixes #934 .
2015-06-17 10:10:18 +01:00
Alvaro Saurin
d086867c0c
make negative TTL default to same value as TTL
2015-06-17 10:17:12 +02:00
Alvaro Saurin
c697d2a8f9
Ignore empty queries (sent when the server is being shut down)
2015-06-16 20:54:51 +02:00
Alvaro Saurin
f4507e7252
Change read-locks for read/write-locks
2015-06-16 16:02:49 +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
048261c921
Hold lock while accessing mutable variable, but release before sending on chan
2015-06-16 13:06:14 +01:00
Bryan Boreham
7a106aeb5f
Release lock before sending on a channel
2015-06-16 11:44:25 +01:00
Bryan Boreham
dd9adf6a65
Don't add a trailing newline to the domain
2015-06-16 10:25:54 +01:00
Bryan Boreham
0ff311356d
Flush the background updater goroutines to make tests reliable
2015-06-15 13:48:54 +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
Bryan Boreham
13944f3811
Refactor is-running check so we can re-use more of the code
2015-06-12 17:09:11 +01:00
Bryan Boreham
5aafbbeff0
Fix compile error introduced in merge of #904
2015-06-12 16:20:35 +01:00
Matthias Radestock
7462fe91d5
Merge pull request #904 from bboreham/inercia-weave-821
...
Remove stale records for short-lived containers (bis)
Fixes #821 . Replaces and hence closes #865 .
2015-06-12 15:36:12 +01:00
Bryan Boreham
7941612dad
remove one level of indentation
2015-06-12 15:01:06 +01:00
Paul Bellamy
96bda1639e
define weavedns http port as a constant
2015-06-11 10:27:35 +01:00
Adam Harrison
a1007411ad
Add /domain resource to DNS REST API
2015-06-11 10:26:07 +01:00