Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1495 from weaveworks/1492-proxy-remove-var-run-mount
Browse files Browse the repository at this point in the history
Remove /var/run mount from exec_remote. Proxy uses /var/run/weave/weave.sock

Fixes #1492.
  • Loading branch information
rade committed Oct 1, 2015
2 parents 49459cf + 827ba44 commit d547829
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion site/proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ modify the default behaviour you will have to use the latter.

By default, the proxy decides where to listen based on how the
launching client connects to docker. If the launching client connected
over a unix socket, the proxy will listen on /var/run/weave.sock. If
over a unix socket, the proxy will listen on /var/run/weave/weave.sock. If
the launching client connected over TCP, the proxy will listen on port
12375, on all network interfaces. This can be adjusted with the `-H`
argument, e.g.
Expand Down
6 changes: 3 additions & 3 deletions test/690_proxy_autoconfig_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ start_suite "Boot the proxy should only listen on client's interface"

# Booting it over unix socket listens on unix socket
run_on $HOST1 COVERAGE=$COVERAGE sudo -E weave launch-proxy
assert_raises "run_on $HOST1 sudo docker -H unix:///var/run/weave.sock ps"
assert_raises "run_on $HOST1 sudo docker -H unix:///var/run/weave/weave.sock ps"
assert_raises "proxy docker_on $HOST1 ps" 1
weave_on $HOST1 stop-proxy

# Booting it over tcp listens on tcp
weave_on $HOST1 launch-proxy
assert_raises "run_on $HOST1 sudo docker -H unix:///var/run/weave.sock ps" 1
assert_raises "run_on $HOST1 sudo docker -H unix:///var/run/weave/weave.sock ps" 1
assert_raises "proxy docker_on $HOST1 ps"
weave_on $HOST1 stop-proxy

# Booting it over tcp (no prefix) listens on tcp
DOCKER_CLIENT_ARGS="-H $HOST1:$DOCKER_PORT" $WEAVE launch-proxy
assert_raises "run_on $HOST1 sudo docker -H unix:///var/run/weave.sock ps" 1
assert_raises "run_on $HOST1 sudo docker -H unix:///var/run/weave/weave.sock ps" 1
assert_raises "proxy docker_on $HOST1 ps"
weave_on $HOST1 stop-proxy

Expand Down
4 changes: 1 addition & 3 deletions weave
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ usage() {

exec_remote() {
docker $DOCKER_CLIENT_ARGS run --rm --privileged --net=host \
-v /var/run:/var/run \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /proc:/hostproc \
-e PROCFS=/hostproc \
-e DOCKERHUB_USER="$DOCKERHUB_USER" \
Expand Down Expand Up @@ -1213,8 +1213,6 @@ launch_proxy() {
--entrypoint=/home/weave/weaveproxy \
$WEAVEPROXY_DOCKER_ARGS $EXEC_IMAGE $COVERAGE_ARGS $PROXY_ARGS)
wait_for_status $PROXY_CONTAINER_NAME http_call_unix $PROXY_CONTAINER_NAME status.sock
# backward compatibility
ln -sf -T /var/run/weave/weave.sock /var/run/weave.sock
}

##########################################################################################
Expand Down

0 comments on commit d547829

Please sign in to comment.