Prevent dnsmasq from reading hosts file

OpenStack-Ansible configures /etc/hosts with the management IP
addresses of containers, but dnsmasq gets confused when it sees those
host names associated with a 10.X address on the lxc bridge. It
causes lots of errors in the log files like these:

  not giving name hydrogen_rsyslog_container-307df194 to the DHCP
  lease of 10.0.3.196 because the name exists in /etc/hosts with
  address 172.29.239.71

This patch adds the --no-hosts option for dnsmasq so that it will
stop reading /etc/hosts and filling up log files.

Closes-Bug: 1668949
Change-Id: I7aa2f0081d7d79ab42fcfc28e3ed6839a4f66c8a
This commit is contained in:
Major Hayden 2017-08-17 13:46:16 -05:00
parent d5bef82dfe
commit 2ffcc79451
No known key found for this signature in database
GPG Key ID: 737051E0C1011FB1

View File

@ -180,6 +180,7 @@ function start_dnsmasq {
--dhcp-no-override \
--strict-order \
--bind-interfaces \
--no-hosts \
--dhcp-authoritative $LXC_IPV6_ARG
success "dnsmasq started."
}