ironic/ironic/tests/unit/drivers/ipxe_config_timeout.template
Dmitry Tantsur 08fe4af481 Correct handling of ramdisk_params in (i)PXE boot
Currently only ipa-api-url is recognized there, since it's hardcoded
in the templates. Anything else is silently ignored. This patch
fixes it by wiring all provided options in pxe_append_params and
dropping the hardcoded ipa-api-url (provided by agent deploy).

Add some logging to make debugging such issues easier.

Change-Id: I573cf99d52a6965d64c2ed7a87cf901c12ea3fec
Story: #1528920
Task: #37255
2019-10-28 10:03:25 +01:00

42 lines
1019 B
Plaintext

#!ipxe
set attempts:int32 10
set i:int32 0
goto deploy
:deploy
imgfree
kernel --timeout 120 http://1.2.3.4:1234/deploy_kernel selinux=0 troubleshoot=0 text test_param BOOTIF=${mac} initrd=deploy_ramdisk || goto retry
initrd --timeout 120 http://1.2.3.4:1234/deploy_ramdisk || goto retry
boot
:retry
iseq ${i} ${attempts} && goto fail ||
inc i
echo No response, retrying in {i} seconds.
sleep ${i}
goto deploy
:fail
echo Failed to get a response after ${attempts} attempts
echo Powering off in 30 seconds.
sleep 30
poweroff
:boot_partition
imgfree
kernel --timeout 120 http://1.2.3.4:1234/kernel root={{ ROOT }} ro text test_param initrd=ramdisk || goto boot_partition
initrd --timeout 120 http://1.2.3.4:1234/ramdisk || goto boot_partition
boot
:boot_ramdisk
imgfree
kernel --timeout 120 http://1.2.3.4:1234/kernel root=/dev/ram0 text test_param ramdisk_param initrd=ramdisk || goto boot_ramdisk
initrd --timeout 120 http://1.2.3.4:1234/ramdisk || goto boot_ramdisk
boot
:boot_whole_disk
sanboot --no-describe