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
This commit is contained in:
Matthias Radestock committed 2014-11-06 22:02:24 +00:00
1 parent 57c17b6cef
commit a16c6acc32
1 file changed
+3
+3
View File
@@ -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