From dfff2af1472146bf220929d9993ae30b24d269c2 Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Tue, 1 Mar 2016 15:11:50 +0100 Subject: [PATCH] [inspector] use dnsmasq dhcp-sequential-ip flag in dnsmasq.conf Introspection naturally happens in large bulks, after which it's inactive. Small pool for DHCP addresses means that we'll have conflicts due to how dnsmasq distributes them by default - using hashing. This change tells dnsmasq to allocate IP addresses sequentially instead to avoid these conflicts. The drawback of this option is that long-running clients may switch IP addresses if their lease expires. This is not a concern for short introspection process. Change-Id: I0f08609a9f72799ef9f62216041f2b2b9795afd5 --- templates/inspector_dnsmasq_http.erb | 1 + templates/inspector_dnsmasq_tftp.erb | 1 + 2 files changed, 2 insertions(+) diff --git a/templates/inspector_dnsmasq_http.erb b/templates/inspector_dnsmasq_http.erb index 6592475b..ca9729f5 100644 --- a/templates/inspector_dnsmasq_http.erb +++ b/templates/inspector_dnsmasq_http.erb @@ -7,3 +7,4 @@ tftp-root=/tftpboot dhcp-match=ipxe,175 dhcp-boot=tag:!ipxe,undionly.kpxe,localhost.localdomain,<%= @dnsmasq_local_ip %> dhcp-boot=tag:ipxe,http://<%= @dnsmasq_local_ip %>:8088/inspector.ipxe +dhcp-sequential-ip diff --git a/templates/inspector_dnsmasq_tftp.erb b/templates/inspector_dnsmasq_tftp.erb index 890f273c..6583f48c 100644 --- a/templates/inspector_dnsmasq_tftp.erb +++ b/templates/inspector_dnsmasq_tftp.erb @@ -5,3 +5,4 @@ dhcp-range=<%= @dnsmasq_ip_range %>,29 enable-tftp tftp-root=/tftpboot dhcp-boot=pxelinux.0,localhost.localdomain,<%= @dnsmasq_local_ip %> +dhcp-sequential-ip