Skip to content

Commit 77d683c

Browse files
committed
ironic: Fix UEFI & iPXE bootloader filenames
When using Ironic with UEFI boot mode and iPXE booting, nodes will attempt to chainload iPXE using a Network Boot Program (NBP). This is configured in Ironic via [pxe] uefi_ipxe_bootfile_name, and the default since Xena is snponly.efi. In Wallaby and earlier releases, the default was ipxe.efi. These files need to be available in the /tftpboot directory of the ironic-pxe image. The current default of snponly.efi was not present for any supported distros. ipxe.efi was present for Debian/Ubuntu but not CentOS, which appends the architecture to the filename (e.g. ipxe-x86_64.efi). This change ensures that both ipxe.efi and snponly.efi exist in /tftpboot for all supported distributions, ensuring that both the current and previous Ironic defaults should work. Where these files have different names, we use symlinks to allow for any deployers overriding the filenames in configuration. Closes-Bug: #1959203 Change-Id: I79e78dca550262fc86b092a036f9ea96b214ab48 (cherry picked from commit 909710d)
1 parent 07f5199 commit 77d683c

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

docker/ironic/ironic-pxe/extend_start.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,27 @@ function prepare_pxe_grub {
3636
}
3737

3838
function prepare_ipxe {
39+
# NOTE(mgoddard): Ironic uses snponly.efi as the default for
40+
# uefi_ipxe_bootfile_name since Xena. In Wallaby and earlier releases it
41+
# was ipxe.efi. Ensure that both exist, using symlinks where the files are
42+
# named differently to allow the original names to be used in ironic.conf.
3943
if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then
4044
cp /usr/lib/ipxe/{undionly.kpxe,ipxe.efi} /tftpboot
45+
# NOTE(mgoddard): The 'else' can be removed when snponly.efi is
46+
# available in Jammy 22.04.
47+
if [[ -f /usr/lib/ipxe/snponly.efi ]]; then
48+
cp /usr/lib/ipxe/snponly.efi /tftpboot/snponly.efi
49+
elif [[ ! -e /tftpboot/snponly.efi ]]; then
50+
ln -s /tftpboot/ipxe.efi /tftpboot/snponly.efi
51+
fi
4152
elif [[ "${KOLLA_BASE_DISTRO}" =~ centos|rhel ]]; then
4253
cp /usr/share/ipxe/{undionly.kpxe,ipxe*.efi} /tftpboot
54+
if [[ ! -e /tftpboot/ipxe.efi ]]; then
55+
ln -s /tftpboot/ipxe-${KOLLA_BASE_ARCH}.efi /tftpboot/ipxe.efi
56+
fi
57+
if [[ ! -e /tftpboot/snponly.efi ]]; then
58+
ln -s /tftpboot/ipxe-snponly-${KOLLA_BASE_ARCH}.efi /tftpboot/snponly.efi
59+
fi
4360
fi
4461
}
4562

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
fixes:
3+
- |
4+
Fixes an issue with Ironic deployments using UEFI and iPXE, where the
5+
default UEFI iPXE bootloader in Ironic was not available in the TFTP
6+
server. This affects all Kolla releases on CentOS, and Xena on
7+
Debian/Ubuntu. `LP#1959203
8+
<https://bugs.launchpad.net/kolla/+bug/1959203>`__

0 commit comments

Comments
 (0)