[RFE] Support multi arch deployments

Bug #1582964 reported by Yibo Cai
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Wishlist
Yibo Cai

Bug Description

Depending on BIOS or UEFI node property, Ironic selects boot file based on "pxe_bootfile_name" and "uefi_pxe_bootfile_name" options. For each option, only one value can be set. For example, "uefi_pxe_bootfile_name = bootx64.efi" to deploy x86_64 nodes.

To deploy other architecture, say AArch64, we have to change the setting to something like "uefi_pxe_bootfile_name = grubaa64.efi". After that, this Ironic conductor can only deploy AArch64 nodes, not x86_64.

Some bare metal provisioning tools, like MaaS, support multi arch deployment by one server. I wonder if Ironic could also support it.

Proposal:
- Introduce two new dictionary options: "pxe_bootfile_name_by_arch" and "pxe_config_template_by_arch".
- "pxe_bootfile_name_by_arch" preempts "pxe_bootfile_name" and "uefi_pxe_bootfile_name" if node's cpu_arch is found in the dictionary.
- E.g. pxe_bootfile_name_by_arch = aarch64:grubaa64.efi,ppc64:bootppc64.bin
  * For x86_64 nodes, original "pxe_bootfile_name" and "uefi_pxe_bootfile_name" are used as usual.
  * For aarch64 nodes, boot file will be grubaa64.efi.
- Same rule for "pxe_config_template_by_arch".

Tags: rfe-approved
Yibo Cai (cyb70289)
description: updated
description: updated
description: updated
Yibo Cai (cyb70289)
Changed in ironic:
assignee: nobody → Yibo Cai (cyb70289)
Yibo Cai (cyb70289)
description: updated
Yibo Cai (cyb70289)
description: updated
Dmitry Tantsur (divius)
summary: - To support multi arch deployment
+ [RFE] Support multi arch deployments
tags: added: rfe
Changed in ironic:
status: New → Confirmed
importance: Undecided → Wishlist
Dmitry Tantsur (divius)
tags: added: rfe-approved
removed: rfe
Revision history for this message
Lucas Alvares Gomes (lucasagomes) wrote :

Before approving, can you give a more realistic example of how the pxe_bootfile_names will look like?

Your example:

pxe_bootfile_names = "def-filename" "arch2:filename2" "arch3:filename3"

Where's the boot mode (bios vs uefi) there?

...

Also, how do we handle backward compatibility with old options? Check if "pxe_bootfile_names" is set, if so use it, if not use the old pxe_bootfile_name/uefi_pxe_bootfile_name ?

tags: added: rfe
removed: rfe-approved
Revision history for this message
Yibo Cai (cyb70289) wrote :

About "bios/uefi boot mode encoding"
====================================

In statement: pxe_bootfile_name = "def-filename" "arch2:filename2" "arch3:filename3".
"arch2","arch3" are not "x86","aarch64", but client-arch code from RFC4578(https://tools.ietf.org/html/rfc4578). The client-arch code contains both arch and boot mode information, as follows:
(copied from RFC4578)
Type Architecture Name
---- -----------------
0 Intel x86PC (BIOS)
...
6 EFI IA32
...
9 EFI x86-64
B EFI AArch64
C PowerPC64

The final statement looks like:
pxe_bootfile_name = pxelinux.0 09:bootx64.efi 0B:grubaa64.efi 0C:bootppc64.bin

About "backward compatibility"
==============================

Rather than introducing a new parameter, maybe we can extend current "pxe_bootfile_name". Its default value is still only "pxelinux.0". Arch specific extensions can be appended like upper example. Internal representation becomes a dictionary.

Add an optional property "pxe_client_arch" to Ironic node. If the node needs a arch specific bootfile, it can set this property to match arch in pxe_bootfile_name extensions.

"uefi_pxe_bootfile_name" is kept, which is "default bootfile for uefi node without pxe_client_arch specified".

By this way, looks current deployment and configurations won't be affected.

About boot template file
========================

"pxe_config_template" parameter should also be extended this way.

Yibo Cai (cyb70289)
Changed in ironic:
status: Confirmed → In Progress
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/322632

Revision history for this message
Yibo Cai (cyb70289) wrote :

Current code logic:

- Two new dictionary options are introduced: "pxe_bootfile_name_by_arch" and "pxe_config_template_by_arch".
- "pxe_bootfile_name_by_arch" preempts 'pxe_bootfile_name' and 'uefi_pxe_bootfile_name' if node's cpu_arch is found in the dictionary value.
- E.g. pxe_bootfile_name_by_arch = aarch64:grubaa64.efi,ppc64:bootppc64.bin
  * For x86/x86_64 nodes, original 'pxe_bootfile_name' and 'uefi_pxe_bootfile_name' are used as usual.
  * For aarch64 nodes, boot file will be grubaa64.efi.
- Same rule for "pxe_config_template_by_arch".

Revision history for this message
Yibo Cai (cyb70289) wrote :

Hi Lucas,

Would you have a look at current code and above comment? If it's okay, please help approving this rfe. Thanks.

BR,
Yibo

Revision history for this message
Lucas Alvares Gomes (lucasagomes) wrote :

Hi Yibo,

Sorry for the delay on this. Yes I like the last code logic (comment #4)!

tags: added: rfe-approved
removed: rfe
Revision history for this message
Lucas Alvares Gomes (lucasagomes) wrote :

Btw, can you please update the bug description with the current proposed design ?

Yibo Cai (cyb70289)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/322632
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=f8ff1b26beb7c386429d1ddb2f869a225cc71d8d
Submitter: Jenkins
Branch: master

commit f8ff1b26beb7c386429d1ddb2f869a225cc71d8d
Author: Yibo Cai <email address hidden>
Date: Mon May 23 17:58:28 2016 +0800

    Support multi arch deployment

    Ironic is flexible for x86/x86_64 servers by supporting BIOS and UEFI.
    But to deploy servers of other architectures, such as aarch64 or ppc64,
    configuration(PXE boot file and config template) must be modified,
    which means one Ironic conductor can only deploy baremetal machines of
    one architecture.

    This patch adds multi arch deployment support. For example, to deploy
    x86_64 and aarch64 servers by one Ironic conductor.

    Closes-Bug: #1582964

    Change-Id: I628320aeb44b232a262d0843bc726a68d297e1f8

Changed in ironic:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to ironic (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/386313

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to ironic (master)

Reviewed: https://review.openstack.org/386313
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=168d48eb76fdd39872f57b61f2d0e4e857ffd219
Submitter: Jenkins
Branch: master

commit 168d48eb76fdd39872f57b61f2d0e4e857ffd219
Author: Ruby Loo <email address hidden>
Date: Thu Oct 13 22:57:00 2016 -0400

    Update guide for PXE multi-architecture setup

    This updates documentation for PXE multi-architecture setup in
    the install guide. It clarifies the values for the two *_arch
    config options and combines the two examples into one.

    Change-Id: I10684e16dd6efcc6d17fb4a825e55286c16a20be
    Related-Bug: #1582964

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ironic 7.0.0

This issue was fixed in the openstack/ironic 7.0.0 release.

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.