don't attach rewrite_etc_hosts helper container to weave
...since that is a) inefficent and b) can block when IPAM hasn't had consensus. We can only end up in this situation when DOCKER_HOST is pointing at the weave proxy and we are running `weave run|attach` with `--local`. So it's very much an edge case. Fixes #1858.
This commit is contained in:
1 parent
216a0fe4fc
commit
e4295a2da9
1 file changed
+1
-1
@@ -1169,7 +1169,7 @@ rewrite_etc_hosts() {
|
||||
CONTENTS="$(etc_hosts_contents $FQDN "$@")"
|
||||
# rewrite /etc/hosts, unlinking the file (so Docker does not modify it again) but
|
||||
# leaving it with valid contents...
|
||||
docker run --rm --net=none --privileged \
|
||||
docker run --rm --net=none -e WEAVE_CIDR=none --privileged \
|
||||
-v $CONTAINERS_PATH:$MNT \
|
||||
--entrypoint=sh \
|
||||
$EXEC_IMAGE -c "echo '$CONTENTS' > $MNT_HOSTS && rm -f $MNT_HOSTS && echo '$CONTENTS' > $MNT_HOSTS"
|
||||
|
||||
Reference in new issue
Block a user