Skip to content

Commit 26b56b6

Browse files
[AI Generated] BugFix: Scale kdump timeouts and crashkernel size for large memory VMs
- Tiered crashkernel allocation: 4G for >8TB, 2G for >4TB, 1G for >1TB RAM - Tiered dump timeout: 4800s for >8TB, 3600s for >4TB, 2400s for >1TB RAM - Tiered reboot timeout: 1200s for >4TB, 900s for >1TB, 600s default - Fixes kdumpcrash_validate_on_cpu415 OSProvisioningTimeout on M416 VMs
1 parent 96869b7 commit 26b56b6

1 file changed

Lines changed: 27 additions & 5 deletions

File tree

lisa/tools/kdump.py

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,16 @@ def calculate_crashkernel_size(self, total_memory: str) -> str:
294294
and float(total_memory.strip("M")) < 2048
295295
):
296296
crash_kernel = "256M"
297-
elif "T" in total_memory and float(total_memory.strip("T")) > 1:
298-
crash_kernel = "1G"
297+
elif "T" in total_memory:
298+
total_memory_tb = float(total_memory.strip("T"))
299+
if total_memory_tb > 8:
300+
crash_kernel = "4G"
301+
elif total_memory_tb > 4:
302+
crash_kernel = "2G"
303+
elif total_memory_tb > 1:
304+
crash_kernel = "1G"
305+
else:
306+
crash_kernel = "512M"
299307
else:
300308
crash_kernel = "512M"
301309
return crash_kernel
@@ -854,8 +862,14 @@ def kdump_test(
854862
# change the dump path and increase the timeout duration
855863
kdump.config_resource_disk_dump_path(self._get_disk_dump_path())
856864
self.timeout_of_dump_crash = 1200
857-
if "T" in total_memory and float(total_memory.strip("T")) > 6:
858-
self.timeout_of_dump_crash = 2000
865+
if "T" in total_memory:
866+
total_memory_tb = float(total_memory.strip("T"))
867+
if total_memory_tb > 8:
868+
self.timeout_of_dump_crash = 4800
869+
elif total_memory_tb > 4:
870+
self.timeout_of_dump_crash = 3600
871+
elif total_memory_tb > 1:
872+
self.timeout_of_dump_crash = 2400
859873

860874
kdump.config_crashkernel_memory(self.crash_kernel)
861875
kdump.enable_kdump_service()
@@ -866,7 +880,15 @@ def kdump_test(
866880
self.node.execute(f"rm -rf {kdump.dump_path}/*", shell=True, sudo=True)
867881

868882
# Reboot system to make kdump take effect
869-
self.node.reboot(time_out=600)
883+
# Large memory VMs (multi-TB) need more time for memory initialization
884+
reboot_timeout = 600
885+
if "T" in total_memory:
886+
total_memory_tb = float(total_memory.strip("T"))
887+
if total_memory_tb > 4:
888+
reboot_timeout = 1200
889+
elif total_memory_tb > 1:
890+
reboot_timeout = 900
891+
self.node.reboot(time_out=reboot_timeout)
870892

871893
# Confirm that the kernel dump mechanism is enabled
872894
kdump.check_crashkernel_loaded(self.crash_kernel)

0 commit comments

Comments
 (0)