- 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.
24 lines
446 B
Bash
Executable File
24 lines
446 B
Bash
Executable File
#! /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
|