From 6669ee9af6bd635ae7efbc2f02e10914549ef708 Mon Sep 17 00:00:00 2001 From: Lucas Alvares Gomes Date: Thu, 9 Apr 2015 14:02:36 +0100 Subject: [PATCH] DHCP agent: Set an "ipxe" tag to work with Ironic Ironic expects neutron to have an "ipxe" tag for the option 175 which is sent by iPXE/gPXE when booting a node. The problem is that up to now this tag was not created by Neutron, causing the nodes deployed with Ironic + iPXE to fail to boot. This patch is creating this tag when launching the dnsmasq process. DocImpact Change-Id: I45a0f51365b37e7d85848fcdcbcf7aa6a1dddfed Closes-Bug: #1442123 --- neutron/agent/linux/dhcp.py | 1 + neutron/tests/unit/agent/linux/test_dhcp.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/neutron/agent/linux/dhcp.py b/neutron/agent/linux/dhcp.py index 7650c3ebb..2068fffd9 100644 --- a/neutron/agent/linux/dhcp.py +++ b/neutron/agent/linux/dhcp.py @@ -315,6 +315,7 @@ class Dnsmasq(DhcpLocalProcess): '--addn-hosts=%s' % self.get_conf_file_name('addn_hosts'), '--dhcp-optsfile=%s' % self.get_conf_file_name('opts'), '--dhcp-leasefile=%s' % self.get_conf_file_name('leases'), + '--dhcp-match=set:ipxe,175', ] possible_leases = 0 diff --git a/neutron/tests/unit/agent/linux/test_dhcp.py b/neutron/tests/unit/agent/linux/test_dhcp.py index 483680326..5f5f3bc3f 100644 --- a/neutron/tests/unit/agent/linux/test_dhcp.py +++ b/neutron/tests/unit/agent/linux/test_dhcp.py @@ -873,7 +873,8 @@ class TestDnsmasq(TestBase): '--dhcp-hostsfile=/dhcp/%s/host' % network.id, '--addn-hosts=/dhcp/%s/addn_hosts' % network.id, '--dhcp-optsfile=/dhcp/%s/opts' % network.id, - '--dhcp-leasefile=/dhcp/%s/leases' % network.id] + '--dhcp-leasefile=/dhcp/%s/leases' % network.id, + '--dhcp-match=set:ipxe,175'] seconds = '' if lease_duration == -1: -- 2.45.2