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

'weave env' became less useful when we stopped using tcp socket #1186

Closed
bboreham opened this issue Jul 17, 2015 · 7 comments
Closed

'weave env' became less useful when we stopped using tcp socket #1186

bboreham opened this issue Jul 17, 2015 · 7 comments
Assignees
Milestone

Comments

@bboreham
Copy link
Contributor

This sequence of commands (found in the README) will now fail:

host2$ weave launch $HOST1
host2$ eval $(weave env)
host2$ docker run --name a2 -ti ubuntu
Post http:///var/run/weave.sock/v1.19/containers/create: dial unix /var/run/weave.sock: permission denied. Are you trying to connect to a TLS-enabled daemon without TLS?

If you then try to fix the problem by running as root,

host2$ sudo weave launch $HOST1
host2$ eval $(sudo weave env)
host2$ sudo docker run --name a2 -ti ubuntu

the third line runs the container without going via the proxy and hence without attaching to weave.

The reason is that sudo does not pick up the environment variable from weave env.

@rade
Copy link
Member

rade commented Jul 17, 2015

IMO, our docs should never ever show sudo <command>. Only ever sudo -s.

@rade
Copy link
Member

rade commented Jul 17, 2015

And maybe stick a prominent warning in the docs.

@errordeveloper
Copy link
Contributor

@bboreham isn't this just down to the fact that permission of weave.sock is not the same as docker.sock or, even, docker.sock wasn't there in the first place and weave launch talke to the daemon via a TCP socket?

@errordeveloper
Copy link
Contributor

@bboreham also, in the second part, I am not sure why you put sudo in front every command...

@errordeveloper
Copy link
Contributor

IMO, our docs should never ever show sudo <command>. Only ever sudo -s.

@rade I like this approach, although there is still a separate issue with secure_path not including default path of weave script that is documented...

@rade
Copy link
Member

rade commented Jul 24, 2015

@bboreham I don't think @bboreham's example is accurate. I cannot think of a situation where that command sequence would have worked previously and now doesn't. The proxy will only choose to listen on a domain socket if that is how the user is interacting with docker. If they were able to do so w/o using sudo, then surely that should also work for the weave socket.

@rade
Copy link
Member

rade commented Jul 27, 2015

I think the following would have worked previously, but now doesn't?

host2$ sudo weave launch $HOST1
host2$ eval $(sudo weave env)
host2$ docker run --name a2 -ti ubuntu

@rade rade self-assigned this Jul 27, 2015
rade added a commit that referenced this issue Jul 27, 2015
document how to run weave when docker access is root-only

Closes #1186.
@rade rade closed this as completed in 65e94f6 Jul 27, 2015
@rade rade modified the milestones: n/a, current Jul 27, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants