Stop and reset old weaveplugin container

in case user has upgraded from <v2.0 and left it running
This commit is contained in:
Bryan Boreham committed 2017-04-13 09:14:04 +00:00
1 parent 6081c400fb
commit 9b5cef9167
1 file changed
+4 -1
+4 -1
View File
@@ -266,6 +266,7 @@ IMAGE=$BASE_IMAGE:$IMAGE_VERSION
CONTAINER_NAME=${WEAVE_CONTAINER_NAME:-weave}
PLUGIN_NAME="$DOCKERHUB_USER/net-plugin"
OLD_PLUGIN_CONTAINER_NAME=weaveplugin
CNI_PLUGIN_NAME="weave-plugin-$IMAGE_VERSION"
CNI_PLUGIN_DIR=${WEAVE_CNI_PLUGIN_DIR:-$HOST_ROOT/opt/cni/bin}
# Note VOLUMES_CONTAINER which is for weavewait should change when you upgrade Weave
@@ -2119,6 +2120,8 @@ EOF
[ $# -eq 0 ] || usage
stop_router
stop_proxy
# In case user has upgraded from <v2.0 and left the old container running
docker stop $OLD_PLUGIN_CONTAINER_NAME >/dev/null 2>&1 || true
;;
stop-router)
[ $# -eq 0 ] || usage
@@ -2148,7 +2151,7 @@ EOF
exit 1
;;
esac
for NAME in $CONTAINER_NAME $PROXY_CONTAINER_NAME ; do
for NAME in $CONTAINER_NAME $PROXY_CONTAINER_NAME $OLD_PLUGIN_CONTAINER_NAME ; do
docker stop $NAME >/dev/null 2>&1 || true
docker rm -f $NAME >/dev/null 2>&1 || true
done