From 2d0be34a937d7bddef44d26cb9651cafad760b40 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Fri, 17 Jun 2016 15:06:29 +0100 Subject: [PATCH 1/2] Fix check to see if plugin is running --- weave | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weave b/weave index 7d824974..d5158abd 100755 --- a/weave +++ b/weave @@ -1868,7 +1868,7 @@ stop_plugin() { protect_against_docker_hang() { # If the plugin is not running, remove its socket so Docker doesn't try to talk to it - if !check_running $PLUGIN_CONTAINER_NAME 2>/dev/null ; then + if ! check_running $PLUGIN_CONTAINER_NAME 2>/dev/null ; then rm -f /run/docker/plugins/weave.sock /run/docker/plugins/weavemesh.sock fi } From 63314beb2a2def67c1705b37e8127ffc907aa905 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Fri, 17 Jun 2016 15:06:46 +0100 Subject: [PATCH 2/2] Remove plugin sockets in 'weave reset' --- weave | 1 + 1 file changed, 1 insertion(+) diff --git a/weave b/weave index d5158abd..045f025b 100755 --- a/weave +++ b/weave @@ -2322,6 +2322,7 @@ EOF docker stop $NAME >/dev/null 2>&1 || true docker rm -f $NAME >/dev/null 2>&1 || true done + protect_against_docker_hang VOLUME_CONTAINERS=$(docker ps -qa --filter label=weavevolumes) [ -n "$VOLUME_CONTAINERS" ] && docker rm -v $VOLUME_CONTAINERS >/dev/null 2>&1 || true conntrack -D -p udp --dport $PORT >/dev/null 2>&1 || true