summaryrefslogtreecommitdiff
path: root/ironic/dhcp
diff options
context:
space:
mode:
authorVasyl Saienko <vsaienko@mirantis.com>2017-09-21 13:39:28 +0000
committerVasyl Saienko <vsaienko@mirantis.com>2017-10-13 12:50:58 +0300
commit228a2a7885e1b04d4180fe8daa2992884decaf6d (patch)
tree7b18d9d711cb09a31fa18e21ecd186106281b57d /ironic/dhcp
parent2d486ca8c0b1ed9251a76945457e0fc28239e7ac (diff)
downloadironic-228a2a7885e1b04d4180fe8daa2992884decaf6d.tar.gz
Change pxe dhcp options name to codes.
There is difference between dhcp option names in different backends. This patch changes options name to code according to [0]. [0] https://www.iana.org/assignments/bootp-dhcp-parameters/bootp-dhcp-parameters.xhtml Closes-Bug: 1717236 This is an updated version of c377f5cbbd034e16b68a3fc30e138b03badc9c94 which problems with PXE and dnsmasq due to buggy dnsmasq code which uses siaddr field to specify tftp server. They are addressed now by always sending server-ip-address to make sure that dnsmasq works. More information about siaddr and option 150,66 can be found in informational RFC https://tools.ietf.org/html/rfc5859 Change-Id: I55487d867979bf6bb4cf228fcf6408beae955d2b
Diffstat (limited to 'ironic/dhcp')
-rw-r--r--ironic/dhcp/base.py16
-rw-r--r--ironic/dhcp/neutron.py16
2 files changed, 12 insertions, 20 deletions
diff --git a/ironic/dhcp/base.py b/ironic/dhcp/base.py
index 94f61fd09..6e694be01 100644
--- a/ironic/dhcp/base.py
+++ b/ironic/dhcp/base.py
@@ -36,12 +36,10 @@ class BaseDHCP(object):
::
- [{'opt_name': 'bootfile-name',
+ [{'opt_name': '67',
'opt_value': 'pxelinux.0'},
- {'opt_name': 'server-ip-address',
- 'opt_value': '123.123.123.456'},
- {'opt_name': 'tftp-server',
- 'opt_value': '123.123.123.123'}]
+ {'opt_name': '66',
+ 'opt_value': '123.123.123.456'}]
:param token: An optional authentication token.
:raises: FailedToUpdateDHCPOptOnPort
@@ -56,12 +54,10 @@ class BaseDHCP(object):
::
- [{'opt_name': 'bootfile-name',
+ [{'opt_name': '67',
'opt_value': 'pxelinux.0'},
- {'opt_name': 'server-ip-address',
- 'opt_value': '123.123.123.456'},
- {'opt_name': 'tftp-server',
- 'opt_value': '123.123.123.123'}]
+ {'opt_name': '66',
+ 'opt_value': '123.123.123.456'}]
:param vifs: A dict with keys 'ports' and 'portgroups' and
dicts as values. Each dict has key/value pairs of the form
diff --git a/ironic/dhcp/neutron.py b/ironic/dhcp/neutron.py
index a474c501d..b885c1851 100644
--- a/ironic/dhcp/neutron.py
+++ b/ironic/dhcp/neutron.py
@@ -47,12 +47,10 @@ class NeutronDHCPApi(base.BaseDHCP):
::
- [{'opt_name': 'bootfile-name',
+ [{'opt_name': '67',
'opt_value': 'pxelinux.0'},
- {'opt_name': 'server-ip-address',
- 'opt_value': '123.123.123.456'},
- {'opt_name': 'tftp-server',
- 'opt_value': '123.123.123.123'}]
+ {'opt_name': '66',
+ 'opt_value': '123.123.123.456'}]
:param token: optional auth token.
:raises: FailedToUpdateDHCPOptOnPort
@@ -72,12 +70,10 @@ class NeutronDHCPApi(base.BaseDHCP):
::
- [{'opt_name': 'bootfile-name',
+ [{'opt_name': '67',
'opt_value': 'pxelinux.0'},
- {'opt_name': 'server-ip-address',
- 'opt_value': '123.123.123.456'},
- {'opt_name': 'tftp-server',
- 'opt_value': '123.123.123.123'}]
+ {'opt_name': '66',
+ 'opt_value': '123.123.123.456'}]
:param vifs: a dict of Neutron port/portgroup dicts
to update DHCP options on. The port/portgroup dict
key should be Ironic port UUIDs, and the values