From 69486c4f58536d35e44cddcfd2d61e487b9d2ba2 Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Wed, 8 Feb 2017 11:40:31 +0000 Subject: [PATCH] playbooks: bifrost-ironic-install: Fix reboot if iPXE boot failed If iPXE boot failed, then make sure the 'reboot' action is really executed. The problem with 'prompt --timeout...' is that this command will fail if no key is pressed. However, iPXE exits immediately if one of the command fails so the 'reboot' action was never executed and the node was stuck in the following unbootable state. boot.ipxe : 395 bytes [script] /pxelinux.cfg/52-54-00-23-e4-c2... No such file or directory (http://ipxe.org/2d0c613b) /pxelinux.cfg/default... ok Configuring (net0 52:54:00:23:e4:c2).................. Error 0x040ee119 (http://ipxe.org/040ee119) Could not boot: Error 0x040ee119 (http://ipxe.org/040ee119) PXE boot failed. No configuration found for MAC 52:54:00:23:e4:c2 Press any key to reboot... Could not boot image: Connection timed out (http://ipxe.org/4c22e035) No more network devices Change-Id: If4b2bab25bcfe8da0a64ee9cc1659580aec9776a --- playbooks/roles/bifrost-ironic-install/files/boot.ipxe | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/roles/bifrost-ironic-install/files/boot.ipxe b/playbooks/roles/bifrost-ironic-install/files/boot.ipxe index 7b52aa776..9bfdd1847 100644 --- a/playbooks/roles/bifrost-ironic-install/files/boot.ipxe +++ b/playbooks/roles/bifrost-ironic-install/files/boot.ipxe @@ -13,5 +13,5 @@ chain pxelinux.cfg/default || goto error_no_config :error_no_config echo PXE boot failed. No configuration found for MAC ${mac} echo Press any key to reboot... -prompt --timeout 180 +prompt --timeout 180 || reboot reboot