]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Make dnsmasq aware of all names
authorYves-Gwenael Bourhis <yves-gwenael.bourhis@cloudwatt.com>
Mon, 21 Oct 2013 14:14:06 +0000 (16:14 +0200)
committerYves-Gwenael Bourhis <yves-gwenael.bourhis@cloudwatt.com>
Thu, 27 Mar 2014 15:51:12 +0000 (16:51 +0100)
commit97a529ad8eaee80e196eb362c4e45901a96ae23c
tree4fdfe3d37166e7456fccb4f65102d77fce377a3c
parent96c0928a46119e9bbebf69f1734875f864f1e51f
Make dnsmasq aware of all names

Each dnsmasq instance on a network is not aware of other dnsmasq's leases.

When dnsmasq is launched with --no-hosts and is not provided an --addn-hosts
file, it can resolve only the hosts to which it gives a dhcp lease and no more.
i.e.:
If dnsmasq service n°1 gives a lease to instance n°1, and dnsmasq service n°2
gives a lease to instance n°2, both VM instances and dnsmasq services being on
the same network: instance n°1 can not resolve instance n°2, because instance
n°1 queries dnsmasq n°1, and since it did not give the lease to instance n°2,
it can not resolve it (it is not aware of its existence). Same issue if
instance n°2 tries to resolve instance n°1.

The solution is to provide dnsmasq with an --addn-hosts file of all hosts on
the network. With an --addn-hosts file, each dnsmasq instance is aware of all
the hosts on the network even if they do not give the lease for a host,
therefore each dnsmasq instance can resolve any host on their network even if
they did not provide the lease for it themselves.

Change-Id: Ic6d4f7854d250889dded5491e4693fcdce32ed00
Fixes: bug #1242712
neutron/agent/linux/dhcp.py
neutron/tests/unit/test_linux_dhcp.py