From 39011a5218500ab5628d572a2b303ffec8bfa7c1 Mon Sep 17 00:00:00 2001 From: David Wragg Date: Mon, 16 Mar 2015 14:58:37 +0000 Subject: [PATCH] Don't clean up the container interface after moving it into the netns The most likely cause of failure is the container going away, in which. case we don't need to clean up. And there are other points of possible failure in the same category in attach(), so making sure we clean up the container interface under all conditions is a broader issue. --- weave | 4 ---- 1 file changed, 4 deletions(-) diff --git a/weave b/weave index 976cc4b9..dab90e71 100755 --- a/weave +++ b/weave @@ -241,10 +241,6 @@ connect_container_to_bridge() { if ! ip netns exec $NETNS ip link set $GUEST_IFNAME name $CONTAINER_IFNAME || ! configure_arp_cache $CONTAINER_IFNAME "ip netns exec $NETNS" ; then - # failed after we assigned the veth to the container's - # namespace, and we don't know if it was renamed or not. - ip netns exec $NETNS ip link del $GUEST_IFNAME type veth 2>/dev/null || true - ip netns exec $NETNS ip link del $CONTAINER_IFNAME type veth 2>/dev/null || true return 1 fi }