From c3a3c7bee0d5fd68ceef1446a43f19b2d4512614 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Mon, 17 Aug 2020 18:19:49 -0400 Subject: [PATCH] ironic-pxe: RHEL/CentOS: install AArch64 modules on all GRUB architectures grub2-efi-aa64-modules ships in RHEL and CentOS on all GRUB architectures (x86_64, ppc64le, aarch64, but not s390x), and therefore can be used on any of them to support heterogeneous clusters with AArch64. Change-Id: Icf7e7bfddec89c4aec89410884480539b6bbfd74 --- docker/ironic/ironic-pxe/Dockerfile.j2 | 9 +++++---- docker/ironic/ironic-pxe/extend_start.sh | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docker/ironic/ironic-pxe/Dockerfile.j2 b/docker/ironic/ironic-pxe/Dockerfile.j2 index cb2fb3204f..700c4dfced 100644 --- a/docker/ironic/ironic-pxe/Dockerfile.j2 +++ b/docker/ironic/ironic-pxe/Dockerfile.j2 @@ -19,10 +19,12 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build ] %} {% endif %} - {% if base_arch == 'aarch64' %} -ENV ironic_arch=aarch64 + # NOTE(hrw): RHEL and CentOS ship those packages on all grub architectures + # (x86_64, ppc64le, aarch64, but not s390x), and therefore can be used on + # any of them to support heterogeneous clusters with AArch64. + {% if base_arch != 's390x' %} {% set ironic_pxe_packages = ironic_pxe_packages + [ - 'grub2-efi', + 'grub2-tools', 'grub2-efi-aa64-modules' ] %} {% endif %} @@ -41,7 +43,6 @@ ENV ironic_arch=aarch64 'syslinux' ] %} {% elif base_arch == 'aarch64' %} -ENV ironic_arch=aarch64 {% set ironic_pxe_packages = ironic_pxe_packages + [ 'grub-efi-arm64' ] %} diff --git a/docker/ironic/ironic-pxe/extend_start.sh b/docker/ironic/ironic-pxe/extend_start.sh index b024d445ee..44f101bb0b 100644 --- a/docker/ironic/ironic-pxe/extend_start.sh +++ b/docker/ironic/ironic-pxe/extend_start.sh @@ -28,7 +28,7 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then exit 0 fi -if [[ "${ironic_arch}" =~ aarch64 ]]; then +if [[ -d /usr/lib/grub/arm64-efi ]]; then modules="boot chain configfile efinet ext2 fat gettext help hfsplus loadenv \ lsefi normal part_gpt part_msdos read search search_fs_file search_fs_uuid \ search_label terminal terminfo tftp linux"