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".
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 ?