-
-
Notifications
You must be signed in to change notification settings - Fork 118
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
systemd-tmpfiles-setup-dev.service: Failed to set up credentials: Protocol error #185
Comments
Seems related to microsoft/WSL#9158 |
This seems to be the main issue: microsoft/WSL#9158 (comment)
|
I'm getting even more errors now
|
I fixed it using the fix from microsoft/WSL#8996 (comment) In my configuration module, I inserted systemd.services.nixs-wsl-systemd-fix = {
description = "Fix the /dev/shm symlink to be a mount";
unitConfig = {
DefaultDependencies = "no";
Before = [ "sysinit.target" "systemd-tmpfiles-setup-dev.service" "systemd-tmpfiles-setup.service" "systemd-sysctl.service" ];
ConditionPathExists = "/dev/shm";
ConditionPathIsSymbolicLink = "/dev/shm";
ConditionPathIsMountPoint = "/run/shm";
};
serviceConfig = {
Type = "oneshot";
ExecStart = [
"${pkgs.coreutils-full}/bin/rm /dev/shm"
"/run/wrappers/bin/mount --bind -o X-mount.mkdir /run/shm /dev/shm"
];
};
wantedBy = [ "sysinit.target" ];
}; EDIT: applied this fix #185 (comment) |
... or we could keep it open and see if we need to make a PR? |
We may want to do the same thing in syschdemd, but honestly I'd prefer we just throw it out and tell people to run native at this point. AFAIK the only remaining issue that affects native and not syschdemd is the environment variable thing. |
Sorry I lack context, do I need to use some other options to avoid this issue? |
You may want to try |
|
I'm having this problem with native systemd too:
(Note 9c0955 is https://github.com/KoviRobi/NixOS-WSL/tree/rob)
The problem seems to be that for me |
The current nixos-wsl master should do the right thing on both the stable release of WSL and the preview one. |
For me this condition was preventing the shim from working: NixOS-WSL/scripts/native-systemd-shim/src/main.rs Lines 46 to 53 in 14273c1
because Also above this never gets called with a directory, as it is: NixOS-WSL/scripts/native-systemd-shim/src/main.rs Lines 18 to 22 in 14273c1
|
I guess the check needs to be flipped somehow, to check if /dev/shm is a mount or not. Would you be interested in trying to fix this? If not, I'll probably get to it tomorrow-ish. |
Yeah I will give it a try, but not sure how to check if something is a mount or not, the |
You can use https://doc.rust-lang.org/std/os/unix/fs/trait.MetadataExt.html#tymethod.dev - compare it between the directory itself and a temporary file created in it. |
I've had success with main...KoviRobi:native-systemd-shim-check-mounts which uses nix-rust/nix@master...KoviRobi:nix-rust:add-linux-mntent-libc-0.2.133 I'll work on getting that properly merged into |
Should be fixed in recent WSL releases. |
Bug description
Rebuilding my configuration does not fail, but systemd is not happy.
To Reproduce
I used this configuration:
with inputs:
The text was updated successfully, but these errors were encountered: