nixpkgs/nixos
Félix Baylac-Jacqué f63c842f1e
nixosTests.systemd-networkd: fix test flakiness
The original idea for this test was, on top of providing a networkd
test, to provide newcomers with a sample configuration they could use
to get started with networkd.

That's precisely why we were doing this systemd tmpfile dance in the
first place. It was a convenient way to create a runtime file with a
specific mode and owner.

Sadly, this tmpfile rule made the test flaky. There's a race condition
between the wireguard interface configured by systemd-networkd and
systemd-tmpfiles-setup.

Sometimes, networkd is going to try loading the wireguard private key
file *before* the said file gets created by systemd-tmpfiles.

A perfect solution here would be to create a "After" dependency
between wg0.netdev and systemd-tmpfiles-setup.service. Sadly, it is
currently impossible to create such a dependency between a
networkd-specific unit and a service.

We're removing this tmp file in favor of pointing networkd directly to
the Nix store. This is clearly something that shouldn't be done in the
real world for a private file: the store is world-readable. However,
this is the only way I found to fix this test flakiness for now.
2020-08-30 21:03:27 +02:00
..
doc Merge pull request #94804 from hercules-ci/init-nixos-hercules-ci-agent 2020-08-29 10:20:14 +02:00
lib nixos/test-driver: Use guest time when using sleep 2020-08-29 00:55:01 +02:00
maintainers Merge pull request #89116 from wagdav/fix-args-create-amis 2020-08-22 16:47:54 +02:00
modules Revert "nixos/nix-daemon.nix: assert distributedBuilds and buildMachines!=[]" 2020-08-29 22:39:24 -05:00
tests nixosTests.systemd-networkd: fix test flakiness 2020-08-30 21:03:27 +02:00
COPYING
default.nix
README treewide: use https for nixos.org and hydra.nixos.org 2020-05-03 22:14:21 -07:00
release-combined.nix nixosTests: re-enable networking tests 2020-08-27 12:17:03 +02:00
release-small.nix nixos/release-small: drop latestKernel.login 2020-04-19 22:20:07 +03:00
release.nix nixos/release: add pantheon closure 2020-07-26 15:30:08 -04:00

*** NixOS ***

NixOS is a Linux distribution based on the purely functional package
management system Nix.  More information can be found at
https://nixos.org/nixos and in the manual in doc/manual.