-
-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Docker service not starting with ZFS storage driver. #10127
Comments
I did end playing around with this more and noticed that I can successfully start the docker daemon so long as I use the command in the systemd file in a shell as root. however systemd executing the same thing fails and causes the error. Oddly enough I am now getting a different error from the systemd service, the one that shows that docker is capable of using the specified storage driver but that something else went wrong.
The part that is confusing me, and I think the crux of the issue, is that I can start the daemon in a shell as root but systemd can't. |
Hmm, i haven't tried with zfs, but it wirks for example with brtfs just fine. Are you running same version in shell as with systemd? |
@offlinehacker Indeed i have tried running the executable mentioned in systemd by specifying the full path. Just dont understand why systemd fails to start the service when I can run the command it says is failing. |
I can confirm this. The issue is that the ZFS storage driver makes calls to the zfs binary which doesn't exist in the systemd $PATH when this is started. |
When using the ZFS storagedriver in docker, it shells out for the ZFS commands. The path configuration for the systemd task does not include ZFS, so if the driver is set to ZFS, add ZFS utilities to the PATH. This will resolve NixOS#10127
When using the ZFS storagedriver in docker, it shells out for the ZFS commands. The path configuration for the systemd task does not include ZFS, so if the driver is set to ZFS, add ZFS utilities to the PATH. This will resolve #10127 [Bjørn: prefix commit message with "nixos/docker:", remove extra space before ';'] (cherry picked from commit 791b600)
@cransom Thanks for figuring this one out and resolving, Cheers mate! |
Hi, I am now using the docker version that has since been patched however I have the same issue. Currently I have a version with this change. I am not a nix expression writer (yet) but perhaps this is causing it to now work again? I was not able to get in and test it before the channel moved on to this sadly so I cannot confirm that it was working with your change @cransom so it may not be that change that causes the issue to persist. Would appreciate any assistance! |
When using the ZFS storagedriver in docker, it shells out for the ZFS commands. The path configuration for the systemd task does not include ZFS, so if the driver is set to ZFS, add ZFS utilities to the PATH. This will resolve NixOS#10127 [Bjørn: prefix commit message with "nixos/docker:", remove extra space before ';'] (cherry picked from commit 791b600)
Hello. First issue here so bare with me please.
I am using the unstable channel of NixOS and have my root partition on ZFS. Naturally i wanted to use the ZFS storage driver for Docker however when I set the option
virtualisation.docker.storageDriver
the docker systemd service fails to start and gives this error:It appears the only storageDriver option I can set and have docker work is
devicemapper
.My apologies if I am missing something here but I even tried to create a new ZFS volume for docker and mounted it on
/var/lib/docker
with no change in error. I looked at the source code for what triggers the error and noticed a different error is shown if your filesystem is wrong or what not and that this error appears specific to docker not supporting it as if its components were not installed.Perhaps I am missing the obvious in that docker just does not have zfs support however it is listed as a valid option for the
virtualisation.docker.storageDriver
option. If this is the case then it should be removed from the valid options there.Thank you for all your work on the awesomeness that is Nix/NixOS!
The text was updated successfully, but these errors were encountered: