From 46762a40b0d3e0e0042a4dc7ea5e5e970e92b210 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Thu, 23 Feb 2017 16:47:32 +0000 Subject: [PATCH] Use 'allids' feature to populate DNS names --- weave | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/weave b/weave index 03ea38e2..19db8803 100755 --- a/weave +++ b/weave @@ -1713,14 +1713,14 @@ fetch_router_args() { NO_DNS_OPT=$(echo $CONTAINER_ARGS | grep -o -e '--no-dns') || true } +populate_dns_for_one_container() { + [ -z "$4" ] || with_container_fqdn $1 put_dns_fqdn $4 +} + populate_router() { if [ -z "$NO_DNS_OPT" ] ; then # Tell the newly-started weaveDNS about existing weave IPs - for CONTAINER in $(docker ps -q --no-trunc) ; do - if CONTAINER_IPS=$(with_container_addresses echo_ips $CONTAINER) && [ -n "$CONTAINER_IPS" ] ; then - with_container_fqdn $CONTAINER put_dns_fqdn $CONTAINER_IPS - fi - done + with_container_addresses populate_dns_for_one_container weave:allids fi }