diff --git a/test/100_cross_hosts_2_test.sh b/test/100_cross_hosts_2_test.sh index 0eab1027..bc6b0a40 100755 --- a/test/100_cross_hosts_2_test.sh +++ b/test/100_cross_hosts_2_test.sh @@ -30,6 +30,8 @@ assert_raises "exec_on $HOST1 c5 $PING $C6" # check that restart retains the same IP, and reclaims it in IPAM weave_on $HOST2 restart c6 assert_raises "exec_on $HOST1 c5 $PING $C6" +# check that restart does not create any additional DNS entry +assert "weave_on $HOST2 report -f \"{{len .DNS.Entries}}\"" "6" sleep 31 # past the IPAM timeout start_container $HOST2 net:$SUBNET_2 --name=c7 C7=$(container_ip $HOST2 c7) diff --git a/weave b/weave index 5cbd0a0f..53ca7ec0 100755 --- a/weave +++ b/weave @@ -2179,8 +2179,8 @@ EOF for CIDR in $ALL_CIDRS ; do call_weave PUT /ip/$CONTAINER/$CIDR?check-alive=true done - with_container_netns_or_die $1 attach $ALL_CIDRS - when_weave_running with_container_fqdn $1 put_dns_fqdn $ALL_CIDRS + with_container_netns_or_die $CONTAINER attach $ALL_CIDRS + when_weave_running with_container_fqdn $CONTAINER put_dns_fqdn $ALL_CIDRS echo $RES ;; dns-add)