bifrost/playbooks/roles/bifrost-ironic-install/templates/inspector-default-boot-ipxe.j2
Markos Chandras cddb736db7 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
2017-02-17 12:58:51 +00:00

11 lines
393 B
Django/Jinja

#!ipxe
dhcp || reboot
goto introspect
:introspect
kernel {{ ipa_kernel_url }} ipa-inspection-callback-url=http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:5050/v1/continue systemd.journald.forward_to_console=yes ip=${ip}:${next-server}:${gateway}:${netmask} BOOTIF=${mac} nofb nomodeset vga=normal console=ttyS0
initrd {{ ipa_ramdisk_url }}
boot