Merge pull request #1919 from weaveworks/issues/1900-dont-stop-stoppin

Warn, don't error, if unable to remove network in 'weave stop'

Fixes #1900.
This commit is contained in:
Matthias Radestock committed 2016-01-21 11:22:21 +00:00
commit a2ff7e5981
1 file changed
+6 -3
+6 -3
View File
@@ -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