weave --local status now reports plugin.
Prints the following when running:
```
Service: plugin
DriverName: weave
```
See also:
- https://weaveworks.slack.com/archives/net/p1488563299009870
- https://weaveworks.slack.com/archives/net/p1488539841009756
This commit is contained in:
1 parent
a81a873703
commit
8c917eeb17
1 file changed
+6
-1
@@ -341,6 +341,7 @@ CONTAINER_NAME=${WEAVE_CONTAINER_NAME:-weave}
|
|||||||
BASE_PLUGIN_IMAGE=$DOCKERHUB_USER/plugin
|
BASE_PLUGIN_IMAGE=$DOCKERHUB_USER/plugin
|
||||||
PLUGIN_IMAGE=$BASE_PLUGIN_IMAGE:$IMAGE_VERSION
|
PLUGIN_IMAGE=$BASE_PLUGIN_IMAGE:$IMAGE_VERSION
|
||||||
PLUGIN_CONTAINER_NAME=weaveplugin
|
PLUGIN_CONTAINER_NAME=weaveplugin
|
||||||
|
PLUGIN_V2_NAME="$DOCKERHUB_USER/pluginv2"
|
||||||
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
|
||||||
@@ -1211,6 +1212,10 @@ check_running() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
is_docker_plugin_enabled() {
|
||||||
|
[ "$(docker plugin inspect -f '{{ .Enabled }}' "$1" 2>/dev/null)" = "true" ]
|
||||||
|
}
|
||||||
|
|
||||||
# Execute $@ only if the weave container is running
|
# Execute $@ only if the weave container is running
|
||||||
when_weave_running() {
|
when_weave_running() {
|
||||||
! check_running $CONTAINER_NAME 2>/dev/null || "$@"
|
! check_running $CONTAINER_NAME 2>/dev/null || "$@"
|
||||||
@@ -2082,7 +2087,7 @@ EOF
|
|||||||
echo " Service: proxy"
|
echo " Service: proxy"
|
||||||
echo " Address: $PROXY_ADDRS"
|
echo " Address: $PROXY_ADDRS"
|
||||||
fi
|
fi
|
||||||
if [ -z "$SUB_STATUS" ] && check_running $PLUGIN_CONTAINER_NAME 2>/dev/null ; then
|
if [ -z "$SUB_STATUS" ] && ( is_docker_plugin_enabled "$PLUGIN_V2_NAME" || check_running $PLUGIN_CONTAINER_NAME 2>/dev/null ) ; then
|
||||||
echo
|
echo
|
||||||
echo " Service: plugin"
|
echo " Service: plugin"
|
||||||
echo " DriverName: weave"
|
echo " DriverName: weave"
|
||||||
|
|||||||
Reference in new issue
Block a user