Warn, don't error, if unable to remove network in 'weave stop'
This commit is contained in:
1 parent
13ec517f94
commit
e47360f8dc
1 file changed
+6
-3
@@ -1715,8 +1715,12 @@ remove_plugin_network() {
|
|||||||
$PLUGIN_IMAGE --remove-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() {
|
stop_plugin() {
|
||||||
remove_plugin_network
|
remove_plugin_network || warn_plugin_active
|
||||||
stop $PLUGIN_CONTAINER_NAME "Plugin"
|
stop $PLUGIN_CONTAINER_NAME "Plugin"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2152,8 +2156,7 @@ EOF
|
|||||||
;;
|
;;
|
||||||
reset)
|
reset)
|
||||||
[ $# -eq 0 ] || usage
|
[ $# -eq 0 ] || usage
|
||||||
plugin_disabled || remove_plugin_network || \
|
plugin_disabled || remove_plugin_network || warn_plugin_active
|
||||||
echo "WARNING: docker may hang in this state; re-launch weave and remove attached containers before shutting down" >&2
|
|
||||||
warn_if_stopping_proxy_in_env
|
warn_if_stopping_proxy_in_env
|
||||||
call_weave DELETE /peer >/dev/null 2>&1 || true
|
call_weave DELETE /peer >/dev/null 2>&1 || true
|
||||||
for NAME in $PLUGIN_CONTAINER_NAME $CONTAINER_NAME $PROXY_CONTAINER_NAME ; do
|
for NAME in $PLUGIN_CONTAINER_NAME $CONTAINER_NAME $PROXY_CONTAINER_NAME ; do
|
||||||
|
|||||||
Reference in new issue
Block a user