vagrant-landrush / landrush

A Vagrant plugin that provides a simple DNS server for Vagrant guests
MIT License
666 stars 78 forks source link

With libvirt provider global dnsmasq can fail to start #258

Closed bexelbie closed 5 years ago

bexelbie commented 8 years ago

in lib/landrush/cap/host/redhat/restart_dnsmasq.rb we should consider altering the algorithm to:

  1. Detect if dnsmasq is already running. If so, assume it is properly configured.
  2. If dnsmasq is not already running, configure dnsmasq to include the following configuration options in /etc/dnsmasq.conf
interface=lo
bind-interfaces
  1. If we restart dnsmasq, check to make sure the restart succeeded and alert the user if it did not.

In Fedora, and I suspect any other libvirt using system, libvirtd starts dnsmasq bound to it's virbr* interfaces. By default dnsmasq attempts to bind and listen to all interfaces. This cases the landrush restart of dnsmasq to fail to start. The above configurations tell dnsmasq to only bind to localhost and to only listen on localhost. Since we are forcing dnsmasq into existance, we should be the ones who limit its scope.

hferentschik commented 7 years ago

Is this not really a duplicate of #252?