From cddb736db729e8c4f4d023f9e92b7dca441bfc7b Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Fri, 17 Feb 2017 12:56:06 +0000 Subject: [PATCH] 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 --- .../templates/inspector-default-boot-ipxe.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/roles/bifrost-ironic-install/templates/inspector-default-boot-ipxe.j2 b/playbooks/roles/bifrost-ironic-install/templates/inspector-default-boot-ipxe.j2 index ebf2de1d9..f8435dddd 100644 --- a/playbooks/roles/bifrost-ironic-install/templates/inspector-default-boot-ipxe.j2 +++ b/playbooks/roles/bifrost-ironic-install/templates/inspector-default-boot-ipxe.j2 @@ -1,6 +1,6 @@ #!ipxe -dhcp +dhcp || reboot goto introspect