From 57242f790ef88f6dd9a804d56e0089fd7ac8dbed Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Fri, 28 Nov 2014 11:06:36 +0000 Subject: [PATCH] check that weave container has an eth0 since w/o that we get an obscure error. The most likely cause for not having an eth0 is that the docker daemon has been configured to disable container networking. --- weave | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/weave b/weave index 7eb5164c..97cf936a 100755 --- a/weave +++ b/weave @@ -216,6 +216,10 @@ connect_container_to_bridge() { } launch() { + if ! ip netns exec $NETNS ip link show eth0 >/dev/null 2>&1 ; then + echo "No eth0 interface inside $CONTAINER_NAME container; perhaps you are running the docker daemon with container networking disabled (-b=none)." >&2 + return 1 + fi connect_container_to_bridge && check_command_and_run_anything ethtool ip netns exec $NETNS ethtool -K eth0 tx off >/dev/null && ip netns exec $NETNS ip link set $CONTAINER_IFNAME up