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

Support weave script running against non-standard DOCKER_HOST #1689

Merged
merged 6 commits into from
Dec 16, 2015

Conversation

paulbellamy
Copy link
Contributor

First part of fixing #1586.

Need to check it works with the plugin, and DOCKER_HOST=tcp://* as well. Any docker invocations I've missed, that need DOCKER_HOST passed in?

@paulbellamy
Copy link
Contributor Author

Update: It doesn't work with the plugin, as the plugin is hard-coded to /var/run/docker.sock

@paulbellamy
Copy link
Contributor Author

Does still work with DOCKER_HOST=tcp://*.

@paulbellamy paulbellamy force-pushed the 1586-alternate-docker-sock branch from 195fcac to 1401100 Compare November 16, 2015 17:31
@paulbellamy paulbellamy changed the title [WIP] Support weave script running against non-standard docker unix sockets. Support weave script running against non-standard docker unix sockets. Nov 17, 2015
@paulbellamy paulbellamy force-pushed the 1586-alternate-docker-sock branch from 1401100 to dc2d794 Compare November 20, 2015 11:35
@awh awh added this to the 1.4.0 milestone Nov 20, 2015
@awh awh self-assigned this Nov 20, 2015
@awh
Copy link
Contributor

awh commented Nov 30, 2015

Needs a rebase - another docker invocation got added to the makefile when the plugin codebase was merged in

@awh
Copy link
Contributor

awh commented Nov 30, 2015

I was going to re-raise weaveworks-experiments/docker-plugin#47 in this repo as we've merged the code bases, but actually that doesn't make sense - the commit from that PR can be added to this one.

@@ -1489,7 +1507,7 @@ launch_router() {
--dns-effective-listen-address $DOCKER_BRIDGE_IP \
${NETHOST_OPT:+$DNS_ROUTER_OPTS} $NO_DNS_OPT \
--http-addr $HTTP_IP:$HTTP_PORT \
--docker-api "unix:///var/run/docker.sock" "$@")
"$@")

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

@awh awh assigned paulbellamy and unassigned awh Nov 30, 2015
@paulbellamy
Copy link
Contributor Author

Also, needs the plugin changes, brought over here, since it moved.

@paulbellamy paulbellamy force-pushed the 1586-alternate-docker-sock branch from 7860eaa to 3081a73 Compare November 30, 2015 16:25
@paulbellamy paulbellamy assigned awh and unassigned paulbellamy Nov 30, 2015
@awh awh changed the title Support weave script running against non-standard docker unix sockets. Support weave script running against non-standard DOCKER_HOST Dec 1, 2015
@awh
Copy link
Contributor

awh commented Dec 1, 2015

Looking good. Can we smoke test this? The vagrantfiles already cause the docker daemon in the test VMs to listen on TCP as well as the standard docker socket; presumably we can extend them to include a non-standard unix socket as well?

@awh awh assigned paulbellamy and unassigned awh Dec 1, 2015
@paulbellamy
Copy link
Contributor Author

Sure, but no guarantees it's actually using the non-standard socket.

Edit: Will add a test, though...

@paulbellamy paulbellamy force-pushed the 1586-alternate-docker-sock branch 2 times, most recently from 67d298e to 9f6d892 Compare December 2, 2015 11:58
@paulbellamy paulbellamy force-pushed the 1586-alternate-docker-sock branch from 9f6d892 to da75848 Compare December 2, 2015 15:35
@paulbellamy
Copy link
Contributor Author

This needs a "rebuild-with-ssh" on circle to debug why test 690 is hanging. Waiting for weaveworks/build-tools#10 to be deployed to fix a bug, for "rebuild-with-ssh" to work.

@paulbellamy paulbellamy force-pushed the 1586-alternate-docker-sock branch from da75848 to 50b8d1e Compare December 8, 2015 10:38
@bboreham bboreham force-pushed the 1586-alternate-docker-sock branch from 50b8d1e to 4fc22a2 Compare December 14, 2015 14:59
if val := os.Getenv("DOCKER_HOST"); val != "" {
dockerSocket = val
}
dockerClient, err := docker.NewClient(dockerSocket)

This comment was marked as abuse.

This comment was marked as abuse.

@paulbellamy paulbellamy removed their assignment Dec 14, 2015
@bboreham bboreham force-pushed the 1586-alternate-docker-sock branch 2 times, most recently from 07a790a to 7c2b210 Compare December 14, 2015 20:51
@@ -31,7 +31,7 @@ check
# Check we can use weave env/config with unix -Hs specified
weave_on $HOST1 stop
weave_on $HOST1 launch-proxy -H unix:///var/run/weave/weave.sock
assert_raises "run_on $HOST1 'eval \$(weave env) ; docker $CMD'"
assert_raises "run_on $HOST1 'docker \$(weave config) $CMD'"

This comment was marked as abuse.

This comment was marked as abuse.

@paulbellamy paulbellamy force-pushed the 1586-alternate-docker-sock branch from 7c2b210 to b6c420b Compare December 15, 2015 10:42
@paulbellamy paulbellamy assigned bboreham and unassigned paulbellamy Dec 15, 2015
@paulbellamy paulbellamy force-pushed the 1586-alternate-docker-sock branch from b6c420b to 6515fe4 Compare December 15, 2015 12:57
@bboreham bboreham force-pushed the 1586-alternate-docker-sock branch 2 times, most recently from cd7f937 to fb74d0a Compare December 15, 2015 16:07
@bboreham bboreham force-pushed the 1586-alternate-docker-sock branch from fb74d0a to 125e9ce Compare December 15, 2015 18:12
paulbellamy and others added 2 commits December 16, 2015 10:14
Means we need to rebuild the gce images

(also small improvement re tmpdir)
 - proxy copies permissions from $DOCKER_HOST socket if available, so in
   this case it was not accessible because we were booting via a TCP
   socket
@bboreham bboreham force-pushed the 1586-alternate-docker-sock branch from 125e9ce to d8cfbc4 Compare December 16, 2015 10:15
bboreham added a commit that referenced this pull request Dec 16, 2015
Support weave script running against non-standard DOCKER_HOST.
@bboreham bboreham merged commit 85c9cf4 into master Dec 16, 2015
@paulbellamy paulbellamy deleted the 1586-alternate-docker-sock branch December 16, 2015 10:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants