roles: bifrost-ironic-install: Reboot if DHCP configuration fails

If the 'dhcp' command failed, then simply reboot the target. This aims
to fix some iPXE boot failures like the following one:

net0: 52:54:00:4a:4e:de using rtl8139 on PCI00:03.0 (open)
  [Link:up, TX:0 TXE:0 RX:0 RXE:0]
  Configuring (net0 52:54:00:4a:4e:de)................ Error 0x040ee119
  (http://ipxe.org/040ee119)
  No more network devices
  No bootable device.

The existing 'chain ... || reboot' command we already have in boot.ipxe
is not enough since that will only capture 'chain' command failures.
However, in this case, the 'chain' command succeeds (we succesfully
transfer control to the chained script) but it's the chained script
that fails so we need to handle errors in that script separately.

Change-Id: I2b27ba75eddf1b77e2a3a45453cf06eed29cc89f
This commit is contained in:
Markos Chandras 2017-02-17 12:56:06 +00:00
parent 419db33b83
commit cddb736db7

View File

@ -1,6 +1,6 @@
#!ipxe
dhcp
dhcp || reboot
goto introspect