From 0aadeeea7d8fd4fe8bb3a657c0a6dd0e3e4f54df Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Fri, 14 Feb 2025 12:48:56 -0800 Subject: [PATCH] Fix devstack plugin for centos The emulator *and* the EFI binary paths are different when using Centos/Fedora, and Fedora/Centos are distinctly different with EFI folder paths. Change-Id: I2c6ba884735f22cc9153de0a24282758ffbdc496 --- devstack/lib/ironic | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/devstack/lib/ironic b/devstack/lib/ironic index ecaefe2aa3..9515fe1178 100644 --- a/devstack/lib/ironic +++ b/devstack/lib/ironic @@ -105,7 +105,12 @@ if [[ ! "$IRONIC_HW_ARCH" =~ $IRONIC_SUPPORTED_HW_ARCH_TYPES_RE ]]; then die $LINENO "Unsupported IRONIC_HW_ARCH: $IRONIC_HW_ARCH. Expected either of 'x86_64' or 'aarch64'." fi -IRONIC_VM_EMULATOR="/usr/bin/qemu-system-${IRONIC_HW_ARCH}" +if is_ubuntu; then + IRONIC_VM_EMULATOR="/usr/bin/qemu-system-${IRONIC_HW_ARCH}" +else + # Fedora/Centos + IRONIC_VM_EMULATOR="/usr/libexec/qemu-kvm" +fi GRUB_ARCH=x64 if [[ $IRONIC_HW_ARCH == "aarch64" ]]; then @@ -722,6 +727,20 @@ if [[ "$IRONIC_BOOT_MODE" == "uefi" ]]; then IRONIC_GRUB2_NETWORK_FILE=/usr/lib/grub/arm64-efi-signed/grubnetaa64.efi.signed fi fi + elif is_fedora && grep -qs "CentOS" /etc/redhat-release; then + if [[ $IRONIC_HW_ARCH == "x86_64" ]]; then + if [[ -z $IRONIC_GRUB2_FILE ]]; then + IRONIC_GRUB2_SHIM_FILE=/boot/efi/EFI/centos/shimx64.efi + IRONIC_GRUB2_FILE=/boot/efi/EFI/centos/grubx64.efi + IRONIC_GRUB2_NETWORK_FILE=/boot/efi/EFI/centos/grubx64.efi + fi + elif [[ $IRONIC_HW_ARCH == "aarch64" ]]; then + if [[ -z $IRONIC_GRUB2_FILE ]]; then + IRONIC_GRUB2_SHIM_FILE=/boot/efi/EFI/centos/shimaa64.efi + IRONIC_GRUB2_FILE=/boot/efi/EFI/centos/grubaa64.efi + IRONIC_GRUB2_NETWORK_FILE=/boot/efi/EFI/centos/grubaa64.efi + fi + fi elif is_fedora; then if [[ $IRONIC_HW_ARCH == "x86_64" ]]; then if [[ -z $IRONIC_GRUB2_FILE ]]; then