From 2b55c8d38858bbb2c78d212ecfebd1f1c9a12d52 Mon Sep 17 00:00:00 2001
From: Julia Kreger <juliaashleykreger@gmail.com>
Date: Fri, 1 Oct 2021 09:09:48 -0700
Subject: [PATCH] CI: Change CI ipxe file to snponly

Ironic's configured default is snponly.efi, and realistically
we should be using it for devstack as ipxe.efi lacks snp which
is included in the EFI standard.

Change-Id: I749420b127cc9954bfa02d9e4efaa0980a9242be
---
 devstack/lib/ironic | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/devstack/lib/ironic b/devstack/lib/ironic
index 5fa1db08f7..3e5bf542ba 100644
--- a/devstack/lib/ironic
+++ b/devstack/lib/ironic
@@ -731,9 +731,11 @@ IRONIC_AGENT_IMAGE_DOWNLOAD_SOURCE=${IRONIC_AGENT_IMAGE_DOWNLOAD_SOURCE:-$IRONIC
 # UEFI related functions
 function get_uefi_ipxe_boot_file {
     if is_ubuntu; then
+        # NOTE(TheJulia): This *should* be snponly.efi, however
+        # ubuntu only started shipping it in hirtuse.
         echo /usr/lib/ipxe/ipxe.efi
     elif is_fedora; then
-        echo /usr/share/ipxe/ipxe-x86_64.efi
+        echo /usr/share/ipxe/ipxe-snponly-x86_64.efi
     fi
 }
 
@@ -1257,6 +1259,11 @@ function configure_ironic_dirs {
         fi
 
         cp $uefi_boot_file $IRONIC_TFTPBOOT_DIR
+        if [[ "$IRONIC_IPXE_ENABLED" == "True" ]]; then
+            # This is due to debt needed with external dhcp service
+            # configuration for inspector discovery cases
+            cp $uefi_boot_file $IRONIC_TFTPBOOT_DIR/snponly.efi
+        fi
 
         if [[ "$IRONIC_IS_HARDWARE" == "False" ]]; then
             local uefi_loader