Stop and reset old weaveplugin container
in case user has upgraded from <v2.0 and left it running
This commit is contained in:
1 parent
6081c400fb
commit
9b5cef9167
1 file changed
+4
-1
@@ -266,6 +266,7 @@ IMAGE=$BASE_IMAGE:$IMAGE_VERSION
|
|||||||
CONTAINER_NAME=${WEAVE_CONTAINER_NAME:-weave}
|
CONTAINER_NAME=${WEAVE_CONTAINER_NAME:-weave}
|
||||||
|
|
||||||
PLUGIN_NAME="$DOCKERHUB_USER/net-plugin"
|
PLUGIN_NAME="$DOCKERHUB_USER/net-plugin"
|
||||||
|
OLD_PLUGIN_CONTAINER_NAME=weaveplugin
|
||||||
CNI_PLUGIN_NAME="weave-plugin-$IMAGE_VERSION"
|
CNI_PLUGIN_NAME="weave-plugin-$IMAGE_VERSION"
|
||||||
CNI_PLUGIN_DIR=${WEAVE_CNI_PLUGIN_DIR:-$HOST_ROOT/opt/cni/bin}
|
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
|
# Note VOLUMES_CONTAINER which is for weavewait should change when you upgrade Weave
|
||||||
@@ -2119,6 +2120,8 @@ EOF
|
|||||||
[ $# -eq 0 ] || usage
|
[ $# -eq 0 ] || usage
|
||||||
stop_router
|
stop_router
|
||||||
stop_proxy
|
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)
|
stop-router)
|
||||||
[ $# -eq 0 ] || usage
|
[ $# -eq 0 ] || usage
|
||||||
@@ -2148,7 +2151,7 @@ EOF
|
|||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
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 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
|
||||||
|
|||||||
Reference in new issue
Block a user