NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.32k stars 14.29k forks source link

libvirt dnsmasq conflicts with normal dnsmasq #227070

Open lucasew opened 1 year ago

lucasew commented 1 year ago

Describe the bug

If dnsmasq from libvirt launches before system dnsmasq (services.dnsmasq), the latter fails to start

Steps To Reproduce

Steps to reproduce the behavior:

  1. Enable libvirt
  2. Enable dnsmasq
  3. Wake up libvirt (will launch libvirt dnsmasq)
  4. systemctl start dnsmasq
  5. sudo kill -9 $(pkill dnsmask) && sudo systemctl start dnsmasq "solves" the problem

Expected behavior

Both starting together without issues

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

abr 19 11:30:36 riverwood dnsmasq[2955566]: FAILED to start up
abr 19 11:30:36 riverwood dnsmasq[2955566]: failed to create listening socket for port 53: Address already in use

Notify maintainers

@fpletz @globin @lovesegfault @edolstra

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

lucasew@riverwood ~/.dotfiles 0$ nix-shell -p nix-info --run 'nix-info -m'
Shell setup complete!
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.21, NixOS, 23.05 (Stoat), 23.05pre-git`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.13.3`
 - nixpkgs: `/nix/store/6m1i0fw9z33yaxj67l5rmpz7y6n9yyds-source`
bjornfor commented 1 year ago

The dnsmasq instance forked by libvirt plays nice by setting dnsmasq configuration option bind-dynamic -- but to run services.dnsmasq.enable you must also set that in services.dnsmasq.extraConfig (or bind-interfaces).

It would be good if we could use https://github.com/NixOS/rfcs/blob/master/rfcs/0042-config-option.md style config for services.dnsmasq; then we could perhaps default to bind-interfaces?

f-f commented 1 year ago

This happens when trying to enable OpenDNS as well.

Kreijstal commented 9 months ago

have this issue too