Skip to content

Moving the UDS file out of /var/lib/docker and into /run/#1328

Merged
aboch merged 1 commit intomoby:masterfrom
mavenugo:extkey
Jul 15, 2016
Merged

Moving the UDS file out of /var/lib/docker and into /run/#1328
aboch merged 1 commit intomoby:masterfrom
mavenugo:extkey

Conversation

@mavenugo
Copy link
Contributor

the UDS sock is an unique file and the lifetime of it is until the
docker daemon dies (gracefully). Hence there is no need for it to be
under /var/lib and not mandatory to be configurable either.

Signed-off-by: Madhu Venugopal madhu@docker.com

@mavenugo
Copy link
Contributor Author

as discussed in #747.

ping @tonistiigi @tianon @thaJeztah

@thaJeztah
Copy link
Member

LGTM, thanks!

@tianon
Copy link
Member

tianon commented Jul 15, 2016

Aren't there two other places this path is hard-coded? (on my phone ATM so hard to verify that there still are -- I know previous versions of libnetwork have it in at least three Go files)

@thaJeztah
Copy link
Member

Looks like there's other occurrences as well yes; https://github.com/docker/libnetwork/search?utf8=✓&q=%22%2Fvar%2Flib%2Fdocker%2F%22

@mavenugo
Copy link
Contributor Author

mavenugo commented Jul 15, 2016

@thaJeztah @tianon If you look closely, the other places are defaultPrefix and are overridden by dataDir passed by during bootup by docker daemon via libnetwork.New call. This PR is the only place where we had kept it pointing to a static location and for a good reason. Now we are just switching to /run which is a more logical and correct location.

@tianon
Copy link
Member

tianon commented Jul 15, 2016

Oh nice! Thanks for clarifying ❤️

Sounds good then! 👍

@tonistiigi
Copy link
Member

LGTM

)

const udsBase = "/var/lib/docker/network/files/"
const udsBase = "/run/libnetwork/"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to keep it under docker hierarchy, so

/run/docker/libnetwork

@mavenugo
Copy link
Contributor Author

@aboch i kept it under /run/ to reduce the string length. But, since we are not making the basepath configurable, the UDS sock url with the "libnetwork" string will still be well under the limit. So yes, thats fine to add it.

the UDS sock is an unique file and the lifetime of it is until the
docker daemon dies (gracefully). Hence there is no need for it to be
under /var/lib and not mandatory to be configurable either.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
@aboch
Copy link
Contributor

aboch commented Jul 15, 2016

Thanks, LGTM

@aboch aboch merged commit a540b41 into moby:master Jul 15, 2016
liusdu pushed a commit to liusdu/moby that referenced this pull request Oct 30, 2017
Backport from: moby/libnetwork#1328

the UDS sock is an unique file and the lifetime of it is until the
docker daemon dies (gracefully). Hence there is no need for it to be
under /var/lib and not mandatory to be configurable either.

Signed-off-by: Madhu Venugopal madhu@docker.com
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
liusdu pushed a commit to liusdu/moby that referenced this pull request Oct 30, 2017
Moving the UDS file out of /var/lib/docker and into /run/

Backport from: moby/libnetwork#1328

the UDS sock is an unique file and the lifetime of it is until the
docker daemon dies (gracefully). Hence there is no need for it to be
under /var/lib and not mandatory to be configurable either.

Signed-off-by: Madhu Venugopal madhu@docker.com
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>



See merge request docker/docker!498
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants