aboutsummaryrefslogtreecommitdiff
path: root/docker/ironic
diff options
context:
space:
mode:
authorMark Goddard <mark@stackhpc.com>2022-02-10 10:58:55 +0000
committerMark Goddard <mark@stackhpc.com>2022-02-10 12:44:14 +0000
commit909710d739f1d7d4c2ef0865ebc9338f260aaa5b (patch)
treec32934b444eb3bc9f6f058dfe198661c3562eedb /docker/ironic
parent838ee8cd9d14a9eee4401c616e92d5147f6808fc (diff)
downloadkolla-909710d739f1d7d4c2ef0865ebc9338f260aaa5b.tar.gz
kolla-909710d739f1d7d4c2ef0865ebc9338f260aaa5b.zip
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
Diffstat (limited to 'docker/ironic')
-rw-r--r--docker/ironic/ironic-pxe/extend_start.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/docker/ironic/ironic-pxe/extend_start.sh b/docker/ironic/ironic-pxe/extend_start.sh
index 6a5071e6a..8d06a90c1 100644
--- a/docker/ironic/ironic-pxe/extend_start.sh
+++ b/docker/ironic/ironic-pxe/extend_start.sh
@@ -36,10 +36,27 @@ function prepare_pxe_grub {
}
function prepare_ipxe {
+ # NOTE(mgoddard): Ironic uses snponly.efi as the default for
+ # uefi_ipxe_bootfile_name since Xena. In Wallaby and earlier releases it
+ # was ipxe.efi. Ensure that both exist, using symlinks where the files are
+ # named differently to allow the original names to be used in ironic.conf.
if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then
cp /usr/lib/ipxe/{undionly.kpxe,ipxe.efi} /tftpboot
+ # NOTE(mgoddard): The 'else' can be removed when snponly.efi is
+ # available in Jammy 22.04.
+ if [[ -f /usr/lib/ipxe/snponly.efi ]]; then
+ cp /usr/lib/ipxe/snponly.efi /tftpboot/snponly.efi
+ elif [[ ! -e /tftpboot/snponly.efi ]]; then
+ ln -s /tftpboot/ipxe.efi /tftpboot/snponly.efi
+ fi
elif [[ "${KOLLA_BASE_DISTRO}" =~ centos ]]; then
cp /usr/share/ipxe/{undionly.kpxe,ipxe*.efi} /tftpboot
+ if [[ ! -e /tftpboot/ipxe.efi ]]; then
+ ln -s /tftpboot/ipxe-${KOLLA_BASE_ARCH}.efi /tftpboot/ipxe.efi
+ fi
+ if [[ ! -e /tftpboot/snponly.efi ]]; then
+ ln -s /tftpboot/ipxe-snponly-${KOLLA_BASE_ARCH}.efi /tftpboot/snponly.efi
+ fi
fi
}