summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Asselstine <mark.asselstine@windriver.com>2015-09-10 13:59:12 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2015-09-10 14:42:43 -0400
commitc3c4d977cbb51363f9030c2e39d56a772b29f73b (patch)
tree2000260bd86943fe0eb820856840f022b6b29d34
parent62e49b861f211312a16367e9b032dfa097fab7d6 (diff)
downloadmeta-virtualization-c3c4d977cbb51363f9030c2e39d56a772b29f73b.tar.gz
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. Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-rw-r--r--recipes-extended/libvirt/libvirt/dnsmasq_exclude_virbr.conf1
-rw-r--r--recipes-support/dnsmasq/dnsmasq_2.%.bbappend5
2 files changed, 5 insertions, 1 deletions
diff --git a/recipes-extended/libvirt/libvirt/dnsmasq_exclude_virbr.conf b/recipes-extended/libvirt/libvirt/dnsmasq_exclude_virbr.conf
deleted file mode 100644
index 16bf1986..00000000
--- a/recipes-extended/libvirt/libvirt/dnsmasq_exclude_virbr.conf
+++ /dev/null
@@ -1 +0,0 @@
1except-interface=virbr0
diff --git a/recipes-support/dnsmasq/dnsmasq_2.%.bbappend b/recipes-support/dnsmasq/dnsmasq_2.%.bbappend
new file mode 100644
index 00000000..8d66ca6a
--- /dev/null
+++ b/recipes-support/dnsmasq/dnsmasq_2.%.bbappend
@@ -0,0 +1,5 @@
1# dnsmasq is greedy with interfaces by default using bind-dynamic will
2# make it less greedy but still function as it did by default.
3do_install_append() {
4 sed -i '/#bind-interfaces/a # Play nice with libvirt\nbind-dynamic' ${D}${sysconfdir}/dnsmasq.conf
5}