Open stefano-m opened 6 years ago
Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:
Ideally this would check the config at rebuild time, like nginx does
I marked this as stale due to inactivity. → More info
Issue description
If
services.dnsmasq.extraConfig
has errors, these are not checked by the systemd unit before starting, making debugging difficult.Steps to reproduce
nixos-rebuild test
dnsmasq.service
will fail without useful informationPossible solution
Make so that the
preStart
attribute indnsmasq.nix
tests againstdnsmasqConf
https://github.com/NixOS/nixpkgs/blob/fdb5ba4cdf9f61e3cba204cbb5b1f81e49231958/nixos/modules/services/networking/dnsmasq.nix#L10
Note that by running the command manually like
/nix/store/.../bin/dnsmasq --test -C /nix/store/.../dnsmasq.conf
I was able to nail down the configuration errors quite easily.Technical details
"x86_64-linux"
Linux 4.14.43, NixOS, 18.03.132507.5f2da7f837e (Impala)
yes
no
nix-env (Nix) 2.0.2
"nixos-18.03.132507.5f2da7f837e"
"nixpkgs-18.03.132448.33682d9af4c"
/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs