From 6c251417d540b3946c23419c63c8bd5fba8e3dca Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Tue, 24 Jan 2017 13:07:17 +0000 Subject: [PATCH] Update 'docker inspect weavedb' format for Docker 1.10 --- weave | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/weave b/weave index 281d43f2..3493ca4a 100755 --- a/weave +++ b/weave @@ -717,11 +717,10 @@ init_bridge_prep() { ip link add name $BRIDGE type bridge - # for Docker 1.12 this needs to be docker inspect -f '{{with index .Mounts 0}}{{.Source}}{{end}}' - # so running this from 'weave --local' may fail. - # also if weaveexec is not on the path it will be run as a Docker container - # that does not have access to /etc/machine-id - WEAVEDB_PATH=$(docker inspect -f '{{index .Volumes "/weavedb"}}' $DB_CONTAINER_NAME 2>/dev/null) + # Running this from 'weave --local' when weaveexec is not on the + # path will run it as a Docker container that does not have access + # to /etc/machine-id, so will not give the full range of persistent IDs + WEAVEDB_PATH=$(docker inspect -f '{{with index .Mounts 0}}{{.Source}}{{end}}' $DB_CONTAINER_NAME 2>/dev/null) MAC=$(util_op unique-id "$HOST_ROOT/$WEAVEDB_PATH/weave" "$HOST_ROOT") ip link set dev $BRIDGE address $MAC