Commit Graph

7 Commits

Author SHA1 Message Date
Florian Klink
fbfe2907af nixos/nscd: use nsncd by default
As announced in the NixOS 22.11 release notes, 23.05 will switch NixOS
to using nsncd (a non-caching reimplementation in Rust) as NSS lookup
dispatcher, instead of the buggy and deprecated glibc-provided nscd.

If you need to switch back, set `services.nscd.enableNsncd = false`, but
please open an issue in nixpkgs so your issue can be fixed.
2023-02-02 11:07:25 +01:00
Florian Klink
a86e080fa4 nixosTests.nscd: add nsncd specialisation
This shows that nsncd successfully passes all the tests that we run
against glibc-nscd.
2022-10-21 09:37:18 +02:00
Florian Klink
e7bc3e7504 nixosTests.nscd: dump nscd socket info with sockdump
This dumps what's sent over the nscd socket to the console output, which
allows debugging.
2022-10-21 09:37:18 +02:00
Florian Klink
a3b07e3693 nixosTests.nscd: update subtest name and comment
test_host_lookups can be used against different daemons speaking the
nscd protocol.
2022-10-20 13:15:16 +02:00
Florian Klink
dea7647814 nixosTests.nscd: drop _gateway lookups
This has shown to be flaky in the VM test, at least when running on
the aarch64 ofborg builder(s).

I assume it's some flakyness in systemd-networkd not being fully up, or
at least not up to the point that it properly replies to the _gateway
request.

This part of the test is supposed to test external (non-glibc) nss
module lookup for the host database works, which is already sufficiently
covered in the previous checks (for *.localhost). Drop these redundant
checks. We're not integration-testing networkd here.
2022-10-14 11:26:48 +02:00
Florian Klink
f08b8d6cfa nixosTests.nscd: test unscd as well
This shows that external nss module resolution is broken with unscd.
2022-10-14 10:07:11 +02:00
Florian Klink
1224368495 nixosTests.nscd: init, move DynamicUser test into there
nixosTests.systemd is quite heavy, it requires a full graphical system,
which is quite a big of a rebuild if the only thing you want to test is
whether dynamic users work.

This is now moved to an `nscd` test, which tests various NSS lookups,
making extra sure that the nscd path is tested, not the fallback path
(by hiding /etc/nsswitch.conf and /etc/hosts for getent).

nixosTests.resolv is removed. It didn't check for reverse lookups,
didn't catch nscd breaking halfway in between, and also had an
ambiguous reverse lookup - 192.0.2.1 could either reverse lookup to
host-ipv4.example.net, or host-dual.example.net.
2022-10-07 14:19:56 +02:00