Merge pull request #2385 from weaveworks/2286-fix-check

Fix check before removing plugin sockets

Fixes the fix in #2292.
This commit is contained in:
Matthias Radestock authored and GitHub committed 2016-06-17 15:47:48 +01:00
commit 61cb5535db
1 file changed
+2 -1
+2 -1
View File
@@ -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
}
@@ -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