]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
DHCP agent: Set an "ipxe" tag to work with Ironic
authorLucas Alvares Gomes <lucasagomes@gmail.com>
Thu, 9 Apr 2015 13:02:36 +0000 (14:02 +0100)
committerLucas Alvares Gomes <lucasagomes@gmail.com>
Fri, 19 Jun 2015 10:04:59 +0000 (11:04 +0100)
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
neutron/tests/unit/agent/linux/test_dhcp.py

index 7650c3ebbf6536b13dbaa85feaaad47476c3445b..2068fffd9ecc87cd0987f508ce4d09290556f9f5 100644 (file)
@@ -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
index 483680326a4df3f80a49cc6d2688d885011eefe1..5f5f3bc3fa746d5365b94c8b994166ce826588ac 100644 (file)
@@ -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: