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

Automatically symlink when proxying unix domain sockets under /var/run #1694

Closed
awh opened this issue Nov 17, 2015 · 4 comments · Fixed by #1696
Closed

Automatically symlink when proxying unix domain sockets under /var/run #1694

awh opened this issue Nov 17, 2015 · 4 comments · Fixed by #1696
Assignees
Milestone

Comments

@awh
Copy link
Contributor

awh commented Nov 17, 2015

The proxy currently generates a warning when you attempt to proxy sockets whose immediate parent is /var/run, due to the issue with mount namespaces capturing network namespaces. Users are advised to make a symlink of the target socket in a subdirectory and supply that instead; this advice should be automated.

@rade
Copy link
Member

rade commented Nov 17, 2015

The idea here is that it avoids the obscure warning we currently issue.

Perhaps we should create a symlink for any domain socket, except /var/run/weave/weave.sock? That way we can just always mount /var/run/weave.

@paulbellamy
Copy link
Contributor

Doing a symlink for any domain socket sounds cleaner. But, in order for the volumes to get unmounted (in case they are /var/run), we need the symlink-creating container to exit. To do that we could either:

    1. Special-case /var/run, mount it into the exec_remote container, and only do the symlink dance for sockets in /var/run.
    1. Have the proxy launch another temporary container with the dirs mounted, and have that create the symlinks.
    1. Parse the proxy flags locally, mounting the socket dirs into the exec_remote container, and create the symlinks from there.

Of those, 1, or 2 sound the cleanest.

awh added a commit that referenced this issue Nov 17, 2015
…unt-h"

This reverts commit 262352f, reversing
changes made to 3126913 due to a bug
whereby `weave env` returns a unix domain socket with an incorrect path.

This change will be superceeded by #1694.
@paulbellamy
Copy link
Contributor

Favouring option 1, as it will run faster (less container creates/destroys), and be less code than launching containers from the proxy.

@awh awh closed this as completed in #1696 Nov 20, 2015
@paulbellamy paulbellamy reopened this Nov 20, 2015
@paulbellamy
Copy link
Contributor

Have realised that option1 won't work because the proxy won't know what address to return for weave env, so we are stuck with option 2.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants