From e339c30a57c3d84bfd150756c73e85ba39deb732 Mon Sep 17 00:00:00 2001 From: Ilya Etingof Date: Tue, 1 Oct 2019 12:12:10 +0200 Subject: [PATCH] Fix EFIBOOT image upload in devstack On restacking devstack, if EFIBOOT image file already exists on the file system, ironic devstack plugin would not re-upload it to Glance failing further ISO image build for Redfish virtual media boot. This change makes Glance upload unconditional. Also in this patch: fixed UEFI firmware configuration in Redfish emulator configuration file produced by devstack plugin. Change-Id: Idf1d2ccc54e1bf60a1df249d0e3fb08fbb98a51c --- devstack/lib/ironic | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/devstack/lib/ironic b/devstack/lib/ironic index 97e0aa3e1a..9066c59657 100644 --- a/devstack/lib/ironic +++ b/devstack/lib/ironic @@ -943,7 +943,7 @@ function configure_redfish { cat - < $IRONIC_REDFISH_EMULATOR_CONFIG SUSHY_EMULATOR_BOOT_LOADER_MAP = { - 'Uefi': { + 'UEFI': { 'x86_64': '$UEFI_LOADER_PATH' }, 'Legacy': { @@ -2577,20 +2577,20 @@ function upload_baremetal_ironic_efiboot { sudo umount $efiboot_mount - # load efiboot into glance - IRONIC_EFIBOOT_ID=$(openstack \ - image create \ - $efiboot_name \ - --public --disk-format=raw \ - --container-format=bare \ - -f value -c id \ - < $efiboot_path) - die_if_not_set $LINENO IRONIC_EFIBOOT_ID "Failed to load EFI bootloader image into glance" - mv $efiboot_path $IRONIC_EFIBOOT - - iniset $IRONIC_CONF_FILE conductor bootloader $IRONIC_EFIBOOT_ID fi + + # load efiboot into glance + IRONIC_EFIBOOT_ID=$(openstack \ + image create \ + $efiboot_name \ + --public --disk-format=raw \ + --container-format=bare \ + -f value -c id \ + < $IRONIC_EFIBOOT) + die_if_not_set $LINENO IRONIC_EFIBOOT_ID "Failed to load EFI bootloader image into glance" + + iniset $IRONIC_CONF_FILE conductor bootloader $IRONIC_EFIBOOT_ID } # build deploy kernel+ramdisk, then upload them to glance