-
-
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
NixOS: can't get machine FQDN when resolved is enabled #132646
Comments
That's interesting without resolved:
with resolved:
This suggests something inside the What does |
Yes,
Edit: Not so sure anymore, I might have forgotten some details. IIRC
Not sure what's the best solution here and if we should maybe just do what The
It was implemented like this when I last looked at it: https://gist.github.com/primeos/8f7f8e1e95518076ef38924125a2f921 |
We shouldn't be deviating from what upstream recommends. There's a lot of reasons on why NSS modules are configured in the order they are (see upstream docs on it).
Maybe we populate our |
I marked this as stale due to inactivity. → More info |
The report doesn't mention what
|
I was attempting to fix I'm sort of piecing things together, from
I browsed through the code and noticed |
Related: |
Note: we decided to rewrite the history of the fork who somehow got out of hand. Feature-wise, this version bump fixes the various host faulty behaviour. See the nix-community/nsncd#9 and nix-community/nsncd#10 PRs for more details. We're in the process of upstreaming this change to twosigma/nsncd, however, upstream has been pretty slow to review our PRs so far. Since the hostname bug surfaces quite regularly in the Nixpkgs issue tracker, we decided to use the nix-community fork as canon for Nixpkgs for now. Fixes: NixOS#132646 Fixes: NixOS#261269
I still have this issue on my system (or a closely related one). The exact conditions to trigger this issue seem to be:
If I stop relevant
|
I can't reproduce :( Could you give me the Nixpkgs commit ref you used for this test? Did you double-check that 92a4138 is in your pin? |
I'm on |
Gah. This will never end. Do we have a VM test for this? I can't check it out rn. Re-opening the issue in the meantime. |
cc @Mic92 for #132646 (comment) Maybe you have more context about this name resolution since you added this @999eagle, could you try the same test with |
I've tried again with Edit: My workaround for this has been
|
The reproduce steps from #132646 (comment) are sufficient to trigger the bug. The test still fails when |
On 23.11 with networking.hostName = "nixos";
networking.domain = "lan";
systemd.network.enable = true; I get: $ hostname
nixos
$ hostname -f
localhost Fedora 39 has
RedHat is a large contributor to systemd, uses it in their distribution and recommends it I made |
Describe the bug
When
services.resolved.enable = true
is used (either manually or withnetworking.useNetworkd = true
), I can no longer get the FQDN of my machine withhostname -f
.Steps To Reproduce
Steps to reproduce the behavior:
services.resolved.enable = true
innixos/tests/hostname.nix
nix-build ./nixos/tests/hostname.nix -A explicitDomain
Expected behavior
The test should succeed and
hostname -f
should return the FQDN whennetworking.domain
is set.Additional context
With the above procedure I could bisect the failure to #130503.
After #130503 the
noExplicitDomain
test innixos/tests/hostname.nix
also fails with the following error:Notify maintainers
@flokli
Metadata
Maintainer information:
The text was updated successfully, but these errors were encountered: