From 4903c2b23c6856891c55f8675448023f4fb4b569 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Thu, 17 Mar 2016 11:47:02 +0000 Subject: [PATCH] Remove unnecessary netns switch for router in attach_router, and improve the name of the function which sends existing container data into the router --- weave | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/weave b/weave index 3b588876..45ecb808 100755 --- a/weave +++ b/weave @@ -1644,7 +1644,7 @@ launch_router() { "$@" setup_router_iface_$BRIDGE_TYPE wait_for_status $CONTAINER_NAME http_call $HTTP_ADDR - [ -n "$ALREADY_RUNNING_CONTAINER" ] || attach_router + [ -n "$ALREADY_RUNNING_CONTAINER" ] || populate_router } # Recreate the parameter values that are set when the router is first launched @@ -1654,7 +1654,7 @@ fetch_router_args() { NO_DNS_OPT=$(echo $CONTAINER_ARGS | grep -o -e '--no-dns') || true } -attach_router() { +populate_router() { if [ -n "$IPRANGE" ] ; then # Tell the newly-started weave IP allocator about existing weave IPs with_container_addresses ipam_reclaim weave:expose $(docker ps -q --no-trunc) @@ -1893,9 +1893,9 @@ EOF enforce_docker_bridge_addr_assign_type create_bridge fetch_router_args - with_container_netns $CONTAINER_NAME setup_router_iface_$BRIDGE_TYPE + setup_router_iface_$BRIDGE_TYPE wait_for_status $CONTAINER_NAME http_call $HTTP_ADDR - attach_router + populate_router ;; launch-proxy) deprecation_warnings "$@"