summaryrefslogtreecommitdiff
path: root/ironic/drivers
diff options
context:
space:
mode:
authorDerek Higgins <derekh@redhat.com>2021-09-29 11:31:59 +0100
committerJulia Kreger <juliaashleykreger@gmail.com>2022-08-01 17:26:49 -0700
commitfb73bdf10501f25b8ed29c23b865c58ed4cb10b7 (patch)
tree730c87ca575a8df92f212e838dae14fd7c781129 /ironic/drivers
parent45c9c3029f5363b6e24e578648c09213a7338db1 (diff)
downloadironic-fb73bdf10501f25b8ed29c23b865c58ed4cb10b7.tar.gz
Exit ipxe script if enable_netboot_fallback failed
The sanboot trick to boot from local disk does not work on all hardware. If it fails exit 0 from the iPxe script so that boot continues on the next device which may be the local disk. Story: #2009258 Task: #43470 Change-Id: I1b6303a987a102dfbfd233334395321c25a55212
Diffstat (limited to 'ironic/drivers')
-rw-r--r--ironic/drivers/modules/boot.ipxe6
-rw-r--r--ironic/drivers/modules/ipxe_config.template2
2 files changed, 7 insertions, 1 deletions
diff --git a/ironic/drivers/modules/boot.ipxe b/ironic/drivers/modules/boot.ipxe
index 4ed58497c..95d95686a 100644
--- a/ironic/drivers/modules/boot.ipxe
+++ b/ironic/drivers/modules/boot.ipxe
@@ -10,6 +10,12 @@ isset ${net${netid}/mac} || goto loop_done
echo Attempting to boot from MAC ${net${netid}/mac:hexhyp}
chain {{ ipxe_for_mac_uri }}${net${netid}/mac:hexhyp} || goto loop
+# If we've got here the chained config returned success
+# suggesting "sanboot" in boot_whole_disk failed (some UEFI cases)
+# exit 0 so the bios continues to the next device
+echo Exiting pxe config to allow boot to continue on next device
+exit 0
+
:loop_done
{% if ipxe_fallback_script -%}
chain {{ ipxe_fallback_script }} | goto boot_failed
diff --git a/ironic/drivers/modules/ipxe_config.template b/ironic/drivers/modules/ipxe_config.template
index bca63c982..7f348bb2f 100644
--- a/ironic/drivers/modules/ipxe_config.template
+++ b/ironic/drivers/modules/ipxe_config.template
@@ -72,4 +72,4 @@ goto boot_iscsi
{%- endif %}
:boot_whole_disk
-sanboot --no-describe
+sanboot --no-describe || exit 0