From e47360f8dc10e4df362d060d240039b1387324fb Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Wed, 20 Jan 2016 16:18:09 +0000 Subject: [PATCH] Warn, don't error, if unable to remove network in 'weave stop' --- weave | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/weave b/weave index 7e98cb51..509188e3 100755 --- a/weave +++ b/weave @@ -1715,8 +1715,12 @@ remove_plugin_network() { $PLUGIN_IMAGE --remove-network } +warn_plugin_active() { + echo "WARNING: docker may hang in this state; re-launch weave and remove attached containers before shutting down" >&2 +} + stop_plugin() { - remove_plugin_network + remove_plugin_network || warn_plugin_active stop $PLUGIN_CONTAINER_NAME "Plugin" } @@ -2152,8 +2156,7 @@ EOF ;; reset) [ $# -eq 0 ] || usage - plugin_disabled || remove_plugin_network || \ - echo "WARNING: docker may hang in this state; re-launch weave and remove attached containers before shutting down" >&2 + plugin_disabled || remove_plugin_network || warn_plugin_active warn_if_stopping_proxy_in_env call_weave DELETE /peer >/dev/null 2>&1 || true for NAME in $PLUGIN_CONTAINER_NAME $CONTAINER_NAME $PROXY_CONTAINER_NAME ; do