pxe config file named by ip can not be fond by host booted from uefi over IPv6 network

Bug #1744622 reported by zhengyong
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Medium
zhengyong

Bug Description

  Ironic will create pxe config file named HOST-IP.conf in tftp server work directory for host whose boot mode is uefi and pxe ip is HOST-IP. This is ok if host work in IPv4 network environment, but if host works in one IPv6 environment, host
 will boot fail.

  If it get one IP 3ffe:501:ffff:101:0:0:0:10e when pxe boot, ironic will create one config named 3ffe\:501\:ffff\:101\:\:10e.conf for this host. while host wants is 3ffe:501:ffff:101:0:0:0:10e.conf.

zhengyong (zhengy23)
Changed in ironic:
assignee: nobody → zhengyong (zhengy23)
Revision history for this message
Michael Turek (mjturek) wrote :

I would've expected this situation to raise an InvalidIPv4Address exception [0]. Not sure why it didn't. That aside, it looks like there indeed does need to be some modification to allow for IPv6 when using PXE and UEFI. [1]

[0] https://github.com/openstack/ironic/blob/master/ironic/common/pxe_utils.py#L98
[1] https://github.com/openstack/ironic/blob/master/ironic/common/pxe_utils.py#L246

Changed in ironic:
importance: Undecided → Critical
importance: Critical → Medium
status: New → Confirmed
Revision history for this message
zhengyong (zhengy23) wrote :

Actually it raises InvalidIPv4Address exception before I chang code in https://github.com/openstack/ironic/blob/master/ironic/dhcp/neutron.py#L157 to Line 163
which is:
if ip_address:
    if netutils.is_valid_ipv4(ip_address):
        return ip_address
    else:
        LOG.error("Neutron returned invalid IPv4 address %s.",
                   ip_address)
        raise exception.InvalidIPv4Address(ip_address=ip_address)

then begin to create pxe config named by one IPv6 address in function https://github.com/openstack/ironic/blob/master/ironic/common/pxe_utils.py# L246 .

Create pxe config named by interface mac works good. If host boots from UEFI pxe over IPv6 network, mac of its boot interface is 11:22:33:44:55:66, bootloader file BOOTX64.EFI got from centos7.4.ISO/EFI/BOOT directory will first load file named 'grub.cfg-11-22-33-44-55-66-'

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

Fix proposed to branch: master
Review: https://review.openstack.org/540649

Changed in ironic:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ironic (master)

Change abandoned by zhengyong (zhengy23@163.com) on branch: master
Review: https://review.openstack.org/540649

Revision history for this message
Julia Kreger (juliaashleykreger) wrote :

I think we've sort of taken care of this over time, although the IP address linking code is still not great, it definitely is no longer the first class path taken, because the default logic in ironic for the last few years has been to do MAC based file names. As such, This should longer a blocker to IPv6 based PXE as the default included template is coded to use a MAC address now.

Changed in ironic:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.