summaryrefslogtreecommitdiff
path: root/ironic/tests/unit/drivers/ipxe_config_boot_from_ramdisk.template
diff options
context:
space:
mode:
authorJulia Kreger <juliaashleykreger@gmail.com>2022-01-26 09:27:09 -0800
committerJulia Kreger <juliaashleykreger@gmail.com>2022-01-26 11:36:19 -0800
commite851d63464597f8825d4c14c0e632d39b82dbc4d (patch)
tree2b9046b34dfc8a0967843d5bb3b7ada3fa6a85f7 /ironic/tests/unit/drivers/ipxe_config_boot_from_ramdisk.template
parent16dc23c3c5c113a1ef0442a45d33488d5d0f9160 (diff)
downloadironic-e851d63464597f8825d4c14c0e632d39b82dbc4d.tar.gz
Add additional ramdisk tests
Noticed we're missing some test coverage in regards to booting from ramdisks when I was investigating an issue which was reported against wallaby. Adds tests which *should* catch the issue I'm chasing in wallaby. Change-Id: I4965d0cc3966c50fa0485b5e194248dd2072f7a8
Diffstat (limited to 'ironic/tests/unit/drivers/ipxe_config_boot_from_ramdisk.template')
-rw-r--r--ironic/tests/unit/drivers/ipxe_config_boot_from_ramdisk.template47
1 files changed, 47 insertions, 0 deletions
diff --git a/ironic/tests/unit/drivers/ipxe_config_boot_from_ramdisk.template b/ironic/tests/unit/drivers/ipxe_config_boot_from_ramdisk.template
new file mode 100644
index 000000000..70f8a03f1
--- /dev/null
+++ b/ironic/tests/unit/drivers/ipxe_config_boot_from_ramdisk.template
@@ -0,0 +1,47 @@
+#!ipxe
+
+set attempts:int32 10
+set i:int32 0
+
+goto deploy
+
+:deploy
+imgfree
+kernel http://1.2.3.4:1234/deploy_kernel selinux=0 troubleshoot=0 text test_param BOOTIF=${mac} initrd=deploy_ramdisk || goto retry
+
+initrd 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 http://1.2.3.4:1234/kernel root={{ ROOT }} ro text test_param initrd=ramdisk || goto boot_partition
+initrd http://1.2.3.4:1234/ramdisk || goto boot_partition
+boot
+
+:boot_anaconda
+imgfree
+kernel http://1.2.3.4:1234/kernel text test_param inst.ks=http://fake/ks.cfg inst.stage2=http://fake/stage2 initrd=ramdisk || goto boot_anaconda
+initrd http://1.2.3.4:1234/ramdisk || goto boot_anaconda
+boot
+
+:boot_ramdisk
+imgfree
+kernel http://1.2.3.4:1234/kernel root=/dev/ram0 text test_param ramdisk_param initrd=ramdisk || goto boot_ramdisk
+initrd http://1.2.3.4:1234/ramdisk || goto boot_ramdisk
+boot
+
+:boot_whole_disk
+sanboot --no-describe