[libvirt] [PATCH] network: always create dnsmasq hosts and addnhosts files, even if empty

Eric Blake eblake at redhat.com
Sat Oct 20 16:44:23 UTC 2012


On 10/20/2012 01:52 AM, Laine Stump wrote:
> This fixes the problem reported in:
> 
>   https://bugzilla.redhat.com/show_bug.cgi?id=868389
> 
> Previously, the dnsmasq hosts file (used for static dhcp entries, and
> addnhosts file (used for additional dns host entries) were only
> created/referenced on the dnsmasq commandline if there was something
> to put in them at the time the network was started. Once we can update
> a network definition while it's active (which is now possible with
> virNetworkUpdate), this is no longer a valid strategy - if there were
> 0 dhcp static hosts (resulting in no reference to the hosts file on the
> commandline), then one was later added, the commandline wouldn't have
> linked dnsmasq up to the file, so even though we create it, dnsmasq
> doesn't pay any attention.
> 
> The solution is to just always create these files and reference them
> on the dnsmasq commandline (almost always, anyway). That way dnsmasq
> can notice when a new entry is added at runtime (a SIGHUP is sent to
> dnsmasq by virNetworkUdpate whenever a host entry is added or removed)
> 

ACK.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 617 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20121020/15b637bb/attachment-0001.sig>


More information about the libvir-list mailing list