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.
This commit is contained in:
1 parent
01f7201a9e
commit
8b061fd555
32 files changed
+1528
-329
No files matched your search
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#! /bin/bash
|
||||
|
||||
. ./config.sh
|
||||
|
||||
NAME=seetwo.weave.local
|
||||
|
||||
N=50
|
||||
start_suite "Add $N dns entries and check we get the right response."
|
||||
|
||||
weave_on $HOST1 launch
|
||||
|
||||
CID=$(start_container_with_dns $HOST1 10.2.1.0/24 --name=c0)
|
||||
IPS=""
|
||||
for i in $(seq $N); do
|
||||
IPS="$IPS 10.2.1.$i"
|
||||
done
|
||||
weave_on $HOST1 dns-add $IPS $CID -h $NAME
|
||||
|
||||
assert_dns_record $HOST1 c0 $NAME $IPS
|
||||
|
||||
assert_raises "exec_on $HOST1 c0 dig MX $NAME | grep -q 'status: NXDOMAIN'"
|
||||
|
||||
end_suite
|
||||
Reference in new issue
Block a user