-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Change socket location to /run/docker.sock #39275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Please sign your commits following these rules: $ git clone -b "move-var-run-to-run" [email protected]:wiktor-k/moby.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -fAmending updates the existing PR. You DO NOT need to open a new one. |
0724b8b to
5ec594e
Compare
AkihiroSuda
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just ignore the warning?
If we want to migrate to the modern path scheme, we would need to update the daemon and the CLI as well, but it is highly likely to break compatibility.
|
I try not to ignore warnings as this builds "warning blindness" but I understand your reasoning. Do you suggest closing this PR until this is discussed further? |
|
Yes, I suggest closing PR, but maybe you can instead add a comment like this: Note that there is no guarantee that |
5ec594e to
1f98d87
Compare
Okay, I think this still would be useful.
🤔 as far as I'm reading "It is valid to implement /var/run as a symlink to /run." I think they mean that /var/run can be implemented as symlink or in any other reasonable manner (hardlink? bind-mount?) not that they would point to two different places... But my previous change would violate other rule that's also on that page:
That is accessing both /var/run and /run (as you mentioned in other places, like CLI or daemon). Thanks for helping with this PR, I really appreciate it! |
|
Are there common systemd-using systems that don't have the |
|
No AFAIK |
That'd have to be an uncanny distro in my opinion. Systemd was released on 2010 and |
|
Yeah, makes sense (and matches what I would expect) -- IMO this should probably go the other way in that case (default to |
This change resolves the following systemd warning: ``` /usr/lib/systemd/system/docker.socket:5: ListenStream= references a path below legacy directory /var/run/, updating /var/run/docker.sock → /run/docker.sock; please update the unit file accordingly. ``` Signed-off-by: Wiktor Kwapisiewicz <[email protected]>
1f98d87 to
8abf26d
Compare
|
Okay, sounds reasonable. Adjusted the socket location and reversed comment's text. See if this looks better. |
tianon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 ❤️
yongtang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Codecov Report
@@ Coverage Diff @@
## master #39275 +/- ##
==========================================
- Coverage 37.05% 37.05% -0.01%
==========================================
Files 612 612
Lines 45478 45478
==========================================
- Hits 16853 16852 -1
Misses 26341 26341
- Partials 2284 2285 +1 |
|
Note that this systemd unit file is not used in the deb/rpm packages; the packages use the unit file from https://github.com/docker/docker-ce-packaging/blob/master/systemd/docker.service Also wondering; if we want to change the actual path; there's many locations in the codebase that look for |
|
@thaJeztah, what action would you suggest? I don't mind filing more PRs against these projects but if there is no consensus that it's a good idea then the work would be wasted... |
|
Running Archlinux, and having installed Edit: fixed by fixing the missing symlink between |
|
@alcohol if that's a default setup of Archlinux, might be good to report that with the Archlinux maintainers. It will be a concern though if there's more systems in the wild that are missing the symlink. @wiktor-k perhaps you could open an issue to track this, on which we can have a discussion on what changes would have to be made? Also thinking (e.g.) having a fallback in the Docker CLI to try both locations (first attempt |
|
I do not think it is default. Was just my vps that was setup incorrectly. Most of my other Archlinux machines have the symlink. |
Just as @alcohol says it was probably a bug on one system. I'm using Arch as well and have correct symlinks in place. (Actually the warnings I saw that pushed me to open this PR was on Arch).
Good idea, which repo should I use? moby? or docker-ce-packaging? |
This repository would be fine; I expect changes will be needed in multiple repositories though (packaging, cli, as well as in this repository to change the default paths that are used, possibly SELinux profiles that need updating) |
This change resolves systemd warning:
- What I did
Update the location of docker socket to use
/rundirectory- How I did it
By editing the file :)
- How to verify it
I used the changed file locally and it worked.
- Description for the changelog
Change location of docker socket to
/run/docker.sock- A picture of a cute animal (not mandatory but encouraged)