summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-12-31 00:33:01 +0000
committerGerrit Code Review <review@openstack.org>2015-12-31 00:33:01 +0000
commitc66f95ec55d5854539d2d55586562ced8f9616fe (patch)
tree4273ac944a42a618ef86a80b672102907e06cb38
parent952c0692f9fabd8fe16e759b200b329ffe75bd71 (diff)
parent35c7f81fa80c44e22d660d0d57f2419430408f43 (diff)
downloadironic-c66f95ec55d5854539d2d55586562ced8f9616fe.tar.gz
Merge "iPXE: Fix assumption that ${mac} is the MAC of the NIC it's booting" into stable/liberty
-rw-r--r--ironic/drivers/modules/boot.ipxe22
-rw-r--r--releasenotes/notes/boot-ipxe-inc-workaround-548e10d1d6616752.yaml5
2 files changed, 23 insertions, 4 deletions
diff --git a/ironic/drivers/modules/boot.ipxe b/ironic/drivers/modules/boot.ipxe
index 56cf76fa0..aa8ee9e51 100644
--- a/ironic/drivers/modules/boot.ipxe
+++ b/ironic/drivers/modules/boot.ipxe
@@ -1,10 +1,24 @@
#!ipxe
-# load the MAC-specific file or fail if it's not found
-chain pxelinux.cfg/${mac:hexhyp} || goto error_no_config
+# NOTE(lucasagomes): Loop over all network devices and boot from
+# the first one capable of booting. For more information see:
+# https://bugs.launchpad.net/ironic/+bug/1504482
+set netid:int32 -1
+:loop
+inc netid || chain pxelinux.cfg/${mac:hexhyp} || goto old_rom
+isset ${net${netid}/mac} || goto loop_done
+echo Attempting to boot from MAC ${net${netid}/mac:hexhyp}
+chain pxelinux.cfg/${net${netid}/mac:hexhyp} || goto loop
-:error_no_config
-echo PXE boot failed. No configuration found for MAC ${mac}
+:loop_done
+echo PXE boot failed! No configuration found for any of the present NICs.
+echo Press any key to reboot...
+prompt --timeout 180
+reboot
+
+:old_rom
+echo PXE boot failed! No configuration found for NIC ${mac:hexhyp}.
+echo Please update your iPXE ROM and retry.
echo Press any key to reboot...
prompt --timeout 180
reboot
diff --git a/releasenotes/notes/boot-ipxe-inc-workaround-548e10d1d6616752.yaml b/releasenotes/notes/boot-ipxe-inc-workaround-548e10d1d6616752.yaml
new file mode 100644
index 000000000..dba277a46
--- /dev/null
+++ b/releasenotes/notes/boot-ipxe-inc-workaround-548e10d1d6616752.yaml
@@ -0,0 +1,5 @@
+---
+fixes:
+ - Make boot.ipxe fallback to its previous behavior on *really* old iPXE
+ ROMs where 'inc' command is not available at all, see
+ https://launchpad.net/bugs/1507738.