Fix IPv6 Option Passing
Turns out that adding option6 was incorrect... and neutron does it incorrectly as well. Removing from ironic, as neutron does the completely wrong thing when a field number is used with dnsmasq and ipv6. Change-Id: Icf88419925abb9b9f10f31aa3a66daea5afe3bb4 Related-Change: I87c15908087111367358043f7a63dd02dd9d16ac Task: 28218 Story: 2004501
This commit is contained in:
parent
9dd732a695
commit
78708835d0
@ -441,11 +441,7 @@ def dhcp_options_for_instance(task, ipxe_enabled=False, url_boot=False):
|
|||||||
else:
|
else:
|
||||||
# NOTE(TheJulia): Booting with v6 means it is always
|
# NOTE(TheJulia): Booting with v6 means it is always
|
||||||
# a URL reply.
|
# a URL reply.
|
||||||
if dhcp_provider_name == 'neutron':
|
boot_file_param = DHCPV6_BOOTFILE_NAME
|
||||||
# dnsmasq requires ipv6 options be explicitly flagged. :(
|
|
||||||
boot_file_param = "option6:{}".format(DHCPV6_BOOTFILE_NAME)
|
|
||||||
else:
|
|
||||||
boot_file_param = DHCPV6_BOOTFILE_NAME
|
|
||||||
url_boot = True
|
url_boot = True
|
||||||
# NOTE(TheJulia): The ip_version value config from the PXE config is
|
# NOTE(TheJulia): The ip_version value config from the PXE config is
|
||||||
# guarded in the configuration, so there is no real sense in having
|
# guarded in the configuration, so there is no real sense in having
|
||||||
@ -454,6 +450,12 @@ def dhcp_options_for_instance(task, ipxe_enabled=False, url_boot=False):
|
|||||||
boot_file = _dhcp_option_file_or_url(task, url_boot)
|
boot_file = _dhcp_option_file_or_url(task, url_boot)
|
||||||
|
|
||||||
if ipxe_enabled:
|
if ipxe_enabled:
|
||||||
|
# TODO(TheJulia): DHCPv6 through dnsmasq + ipxe matching simply
|
||||||
|
# does not work as the dhcp client is tracked via a different
|
||||||
|
# identity mechanism in the exchange. This means if we really
|
||||||
|
# want ipv6 + ipxe, we should be prepared to build a custom
|
||||||
|
# iso with ipxe inside. Likely this is more secure and better
|
||||||
|
# aligns with some of the mega-scale ironic operators.
|
||||||
script_name = os.path.basename(CONF.pxe.ipxe_boot_script)
|
script_name = os.path.basename(CONF.pxe.ipxe_boot_script)
|
||||||
# TODO(TheJulia): We should make this smarter to handle unwrapped v6
|
# TODO(TheJulia): We should make this smarter to handle unwrapped v6
|
||||||
# addresses, since the format is http://[ff80::1]:80/boot.ipxe.
|
# addresses, since the format is http://[ff80::1]:80/boot.ipxe.
|
||||||
|
@ -728,7 +728,7 @@ class TestPXEUtils(db_base.DbTestCase):
|
|||||||
# options are not imported, although they may be supported
|
# options are not imported, although they may be supported
|
||||||
# by vendors. The apparent proper option is to return a
|
# by vendors. The apparent proper option is to return a
|
||||||
# URL in the field https://tools.ietf.org/html/rfc5970#section-3
|
# URL in the field https://tools.ietf.org/html/rfc5970#section-3
|
||||||
expected_info = [{'opt_name': 'option6:59',
|
expected_info = [{'opt_name': '59',
|
||||||
'opt_value': 'tftp://[ff80::1]/fake-bootfile',
|
'opt_value': 'tftp://[ff80::1]/fake-bootfile',
|
||||||
'ip_version': ip_version}]
|
'ip_version': ip_version}]
|
||||||
elif ip_version == 4:
|
elif ip_version == 4:
|
||||||
@ -857,10 +857,10 @@ class TestPXEUtils(db_base.DbTestCase):
|
|||||||
self.config(dhcp_provider='neutron', group='dhcp')
|
self.config(dhcp_provider='neutron', group='dhcp')
|
||||||
if ip_version == 6:
|
if ip_version == 6:
|
||||||
# Boot URL variable set from prior test of isc parameters.
|
# Boot URL variable set from prior test of isc parameters.
|
||||||
expected_info = [{'opt_name': 'tag:!ipxe,option6:59',
|
expected_info = [{'opt_name': 'tag:!ipxe,59',
|
||||||
'opt_value': 'tftp://[ff80::1]/fake-bootfile',
|
'opt_value': 'tftp://[ff80::1]/fake-bootfile',
|
||||||
'ip_version': ip_version},
|
'ip_version': ip_version},
|
||||||
{'opt_name': 'tag:ipxe,option6:59',
|
{'opt_name': 'tag:ipxe,59',
|
||||||
'opt_value': expected_boot_script_url,
|
'opt_value': expected_boot_script_url,
|
||||||
'ip_version': ip_version}]
|
'ip_version': ip_version}]
|
||||||
elif ip_version == 4:
|
elif ip_version == 4:
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
issues:
|
||||||
|
- |
|
||||||
|
Support for IPv6 and iPXE is restricted and is unlikely to work in default
|
||||||
|
scenarios and configurations without external intervention. This is due to
|
||||||
|
the way DHCPv6 and dnsmasq operate. At present this issue is being tracked
|
||||||
|
in story `2005402 <https://storyboard.openstack.org/#!/story/2004502>`_.
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Fixes an issue introduced during the Stein development cycle in an attempt
|
||||||
|
to fix IPv6 support where the networking service was also prepending the
|
||||||
|
DHCP option indicator to the number. A fix has been been submitted to the
|
||||||
|
Networking service to address this issue, and the prepending code has been
|
||||||
|
removed from ironic. See story
|
||||||
|
`2004501 <https://storyboard.openstack.org/#!/story/2004501>`_ for more
|
||||||
|
information.
|
Loading…
x
Reference in New Issue
Block a user