From a16c6acc32a65a1cb6409105a5618d191704852b Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Thu, 6 Nov 2014 22:02:24 +0000 Subject: [PATCH] properly detach containers from network on 'weave reset' since otherwise we are leaving veth pairs behind which a) breaks a subsequent 'weave attach', and b) runs contrary to 'weave reset's stated purpose of removing all traces of weave. NB: This does yank the ethwe interface from the containers. Fixes #164 --- weave | 3 +++ 1 file changed, 3 insertions(+) diff --git a/weave b/weave index 06dd7ba9..16f7d0c2 100755 --- a/weave +++ b/weave @@ -463,6 +463,9 @@ case "$COMMAND" in docker rm -f $CONTAINER_NAME >/dev/null 2>&1 || true check_command_and_run conntrack conntrack -D -p udp --dport $PORT >/dev/null 2>&1 || true destroy_bridge + for LOCAL_IFNAME in $(ip link show | grep v${CONTAINER_IFNAME}pl | cut -d ' ' -f 2 | tr -d ':') ; do + ip link del $LOCAL_IFNAME + done ;; *) echo "Unknown weave command '$COMMAND'" >&2