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:
commit
61cb5535db
1 file changed
+2
-1
@@ -1868,7 +1868,7 @@ stop_plugin() {
|
|||||||
|
|
||||||
protect_against_docker_hang() {
|
protect_against_docker_hang() {
|
||||||
# If the plugin is not running, remove its socket so Docker doesn't try to talk to it
|
# 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
|
rm -f /run/docker/plugins/weave.sock /run/docker/plugins/weavemesh.sock
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -2322,6 +2322,7 @@ EOF
|
|||||||
docker stop $NAME >/dev/null 2>&1 || true
|
docker stop $NAME >/dev/null 2>&1 || true
|
||||||
docker rm -f $NAME >/dev/null 2>&1 || true
|
docker rm -f $NAME >/dev/null 2>&1 || true
|
||||||
done
|
done
|
||||||
|
protect_against_docker_hang
|
||||||
VOLUME_CONTAINERS=$(docker ps -qa --filter label=weavevolumes)
|
VOLUME_CONTAINERS=$(docker ps -qa --filter label=weavevolumes)
|
||||||
[ -n "$VOLUME_CONTAINERS" ] && docker rm -v $VOLUME_CONTAINERS >/dev/null 2>&1 || true
|
[ -n "$VOLUME_CONTAINERS" ] && docker rm -v $VOLUME_CONTAINERS >/dev/null 2>&1 || true
|
||||||
conntrack -D -p udp --dport $PORT >/dev/null 2>&1 || true
|
conntrack -D -p udp --dport $PORT >/dev/null 2>&1 || true
|
||||||
|
|||||||
Reference in new issue
Block a user