Use ContainerID when restarting a container
Otherwise, we are risking to leak DNS entries which happens when ContainerName is passed to `weave reset` and subsequent internal call to nameserver creates a new entry instead of replacing the old one. The ContainerID of the new entry is set to ContainerName and in such case stopping the container will not remove the new entry.
This commit is contained in:
1 parent
c984ec1e86
commit
427b6d2902
2 files changed
+4
-2
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user