dnsmasq: allow for multiple instances (per libvirt)
PATCH 1/1 dnsmasq: allow for multiple instances (per libvirt)
We have had a persistent issue of contention with multiple instances of dnsmasq. When libvirtd is started it will attempt and fail to create virbr0 that includes a dnsmasq binding (dnsmasq complains that the port is already in use). The root cause being that the base dnsmasq configuration uses the 'default' binding, meaning it will be greedy and bind to all available interfaces, along with any new interfaces that appear. This prevents any new instances of dnsmasq to fail. By changing the base dnsmasq configuration to use 'bind-dynamic' we will be able to create new interfaces and if we want to attach a new dnsmasq instance for the new interface we can, without contention.
Overall this change should not change the default behavior (other then fixing the contention) as the 'bind-dynamic' mode will allow the base config to attach to new interfaces which are not be bound to new dnsmasq instances.
Removing dnsmasq_exclude_virbr.conf which was a previous (partial) attempt that was made to resolve this issue.
--- recipes-extended/libvirt/libvirt/dnsmasq_exclude_virbr.conf | 1 - recipes-support/dnsmasq/dnsmasq_2.%.bbappend | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) delete mode 100644 recipes-extended/libvirt/libvirt/dnsmasq_exclude_virbr.conf create mode 100644 recipes-support/dnsmasq/dnsmasq_2.%.bbappend
recipes-extended/libvirt/libvirt/dnsmasq_exclude_virbr.conf deleted +0 -1
@@ -1 +0,0 @@ -except-interface=virbr0
recipes-support/dnsmasq/dnsmasq_2.%.bbappend new file +5 -0
@@ -0,0 +1,5 @@ +# dnsmasq is greedy with interfaces by default using bind-dynamic will +# make it less greedy but still function as it did by default. +do_install_append() { + sed -i '/#bind-interfaces/a # Play nice with libvirt\nbind-dynamic' ${D}${sysconfdir}/dnsmasq.conf +}
Signature · 1 line
2.1.4