dhcp options for PXE over IPv6 environment is wrong

Bug #1744620 reported by zhengyong
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
In Progress
Medium
Harald Jensås

Bug Description

Now ironic dhcp options passed to neutron for PXE is not sutable for PXE over IPv6 environment.

        dhcp_opts.append({'opt_name': DHCP_BOOTFILE_NAME,
                          'opt_value': boot_file})
        # 210 == tftp server path-prefix or tftp root, will be used to find
        # pxelinux.cfg directory. The pxelinux.0 loader infers this information
        # from it's own path, but Petitboot needs it to be specified by this
        # option since it doesn't use pxelinux.0 loader.
        dhcp_opts.append({'opt_name': DHCP_TFTP_PATH_PREFIX,
                          'opt_value': get_tftp_path_prefix()})

    dhcp_opts.append({'opt_name': DHCP_TFTP_SERVER_NAME,
                      'opt_value': CONF.pxe.tftp_server})
    dhcp_opts.append({'opt_name': DHCP_TFTP_SERVER_ADDRESS,
                      'opt_value': CONF.pxe.tftp_server})
    dhcp_opts.append({'opt_name': 'server-ip-address',
                      'opt_value': CONF.pxe.tftp_server})
    for opt in dhcp_opts:
        opt.update({'ip_version': int(CONF.pxe.ip_version)})

Actually this options is not correct over IPv6 network where option bootfile-url is required.
this should be fixed.

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

Is PXE booting with ipv6 failing for you?

If so, I think we should offer a path to expose this option when using IPv6, but not require it. I might be misinterpreting, but It seems like it's not a required option for PXE booting with DHCPv6.
RFC of the option in question [0] states that:

"This document describes DHCPv6 options that SHOULD be used to provide
configuration information for a node that must be booted using the
network rather than from local storage."

SHOULD is defined in a linked RFC [1] as:

"This word, or the adjective "RECOMMENDED", mean that there
may exist valid reasons in particular circumstances to ignore a
particular item, but the full implications must be understood and
carefully weighed before choosing a different course."

That being said, if ipv6 PXE booting is failing without it, I don't know how else you can boot via IPv6.

[0] https://tools.ietf.org/html/rfc5970
[1] https://tools.ietf.org/html/rfc2119

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

Yes, I have tested ironic over one IPv6 network, it failed in PXE booting. When I change dhcp options to bootfile-url which will be updated to neutron port, it boots ok.

Alse in https://tools.ietf.org/html/rfc5970 in section 3, it says as follows:

3. Options

   Option formats comply with DHCPv6 options per [RFC3315] (Section 6).
   The boot-file-url option (see Section 3.1) is mandatory for booting,
   all other options are optional.

we can see that option boot-file-url is mandatory.

Revision history for this message
Michael Turek (mjturek) wrote :

Thanks zhengyong,

So yeah we should require this option when using IPv6. Set to Confirmed.

Changed in ironic:
status: Incomplete → Confirmed
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/552897

Changed in ironic:
assignee: zhengyong (zhengy23) → Harald Jensås (harald-jensas)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ironic (master)

Change abandoned by Harald Jensås (<email address hidden>) on branch: master
Review: https://review.openstack.org/552897
Reason: I have not had time to look into this for a long time.

I also belive Julia tackled these problems in https://review.openstack.org/628008.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers