From 498f5d2ccd219c97161c71bb8ff85df60a5f38f2 Mon Sep 17 00:00:00 2001 From: Ricardo Carrillo Cruz Date: Fri, 12 Feb 2016 23:10:46 +0100 Subject: [PATCH] Do not offer DHCP leases to unknown machines when using inventory_dhcp Turns out the dhcp-range option of dnsmasq does not constrain the DHCP leases to the range specified. When using inventory_dhcp, we specify the *exact* set of machines that will be managed by dnsmasq via the json inventory and therefore it should just provide IPs to those machines. Change-Id: Ic72ab075a1e2ef351f5ddb00c1a34e5fbb163036 --- .../roles/bifrost-ironic-install/templates/dnsmasq.conf.j2 | 1 + .../notes/dhcp_ignore_inventory_dhcp-44668e3fe710c134.yaml | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 releasenotes/notes/dhcp_ignore_inventory_dhcp-44668e3fe710c134.yaml diff --git a/playbooks/roles/bifrost-ironic-install/templates/dnsmasq.conf.j2 b/playbooks/roles/bifrost-ironic-install/templates/dnsmasq.conf.j2 index 919ef3aac..8619ddb1e 100644 --- a/playbooks/roles/bifrost-ironic-install/templates/dnsmasq.conf.j2 +++ b/playbooks/roles/bifrost-ironic-install/templates/dnsmasq.conf.j2 @@ -45,6 +45,7 @@ conf-dir=/etc/dnsmasq.d {% if inventory_dhcp %} addn-hosts=/etc/dnsmasq.d/bifrost.hosts.d dhcp-hostsfile=/etc/dnsmasq.d/bifrost.dhcp-hosts.d +dhcp-ignore=tag:!known {% endif %} # Set the domain for dnsmasq. this is optional, but if it is set, it diff --git a/releasenotes/notes/dhcp_ignore_inventory_dhcp-44668e3fe710c134.yaml b/releasenotes/notes/dhcp_ignore_inventory_dhcp-44668e3fe710c134.yaml new file mode 100644 index 000000000..8944ff185 --- /dev/null +++ b/releasenotes/notes/dhcp_ignore_inventory_dhcp-44668e3fe710c134.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - Dnsmasq option was added to only offer DHCP leases + to known mac addresses when inventory_dhcp is being used.