Skip to content
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

failed to get current user: user: unknown userid 62583 #20

Open
raboof opened this issue Jun 21, 2021 · 0 comments
Open

failed to get current user: user: unknown userid 62583 #20

raboof opened this issue Jun 21, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@raboof
Copy link
Contributor

raboof commented Jun 21, 2021

Running the trustix daemon from the nixos module, it is running as a DynamicUser systemd module:

https://github.com/tweag/trustix/blob/9bf6f32ab9b28c49fdc12c6e7a847a2b6dc1aa00/packages/trustix/nixos/default.nix#L240-L246

If I understand correctly from http://0pointer.net/blog/dynamic-users-with-systemd.html, systemd should an actual user for this dynamic user, not just a PID. However, I only see a pid:

62583 1341 0.0 0.0 1312748 16264 ? Ssl 14:46 0:00 /nix/store/k17mjpk7hfbmvx9r2abh11rw24x97dlz-trustix-dev/bin/trustix daemon --state . --config /nix/store/yqpsksmayry4qmp6sicimzz6ck0ivxa8-trustix-config.toml

Then, when I try to publish a build (say, nix-build '<nixpkgs>' -A hello --check), it fails on not being able to find the user:

post-build-hook: time="2021-06-21T15:11:59+02:00" level=debug msg="Submitting mapping" storePath=/nix/store/vf8fb2avrxnnhc6n70dkqdlk25f61rwm-hello-2.10
post-build-hook: time="2021-06-21T15:11:59+02:00" level=debug msg="Dialing remote" address="unix:///run/trustix-daemon.socket"
post-build-hook: time="2021-06-21T15:11:59+02:00" level=fatal msg="could not submit: rpc error: code = Unknown desc = failed to get current user: user: unknown userid 62583"

The root cause might be in systemd not creating the user, but perhaps other trustix users have run into the same problem? I'm on nixos-unstable at 33d42ad7cf2769ce6364ed4e52afa8e9d1439d58

raboof added a commit to raboof/trustix that referenced this issue Jun 21, 2021
It seems the post-build-hook configuration option, at least on my nix
version (2.3.12), accepts only the path to an executable, not a complete
command line. Without this change I got:

```
post-build-hook: error: executing '/nix/store/g48w1vfxbl1p7rbsmd1y999g45c61r7z-trustix-dev/bin/trustix-nix post-build-hook --address /run/trustix-daemon.socket': No such file or directory
```

(even with this change it doesn't work yet because the address path needs
a `unix://` prefix to make the dialer accept it, and there's nix-community#19 and nix-community#20)
@adisbladis adisbladis added the bug Something isn't working label Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants