Skip to content

Conversation

@adityagesh
Copy link
Collaborator

  1. Kdump currently has a lot of failures when sufficient disk space is not present, add disk using platform when additional space is required.
  2. Add fstab entry when partition used to store crashdump is not root partition - observed some cases where kdump service fails to start after rebooting due to mount issues.
  3. Refactoring

@adityagesh adityagesh requested a review from LiliDeng as a code owner December 9, 2025 15:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request enhances the kdump test suite to handle insufficient disk space scenarios and improve reliability across reboots. The changes address kdump failures when systems lack sufficient disk space by dynamically adding data disks when needed, and ensure mount points persist across reboots by adding fstab entries.

Key Changes:

  • Introduced a new Fstab tool for managing /etc/fstab entries programmatically
  • Enhanced kdump to calculate required disk space based on system memory and dynamically provision disks when needed
  • Added mount persistence logic to prevent kdump service failures after reboot
  • Refactored code to use tool abstractions (Mkdir, Ls) instead of raw execute commands
  • Fixed Oracle Linux grubby command to remove existing crashkernel parameters before adding new ones

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
lisa/tools/fstab.py New tool for managing /etc/fstab entries with methods to read, add, and ensure entries with UUID support
lisa/tools/kdump.py Enhanced disk space management with dynamic provisioning, added mount persistence, refactored to use tool abstractions, and improved Oracle Linux crashkernel configuration
lisa/tools/init.py Exported new Fstab and FstabEntry classes

Test Suggestions:

According to the LISA Testing Guidelines, all code reviews must include test suggestions. Here are the recommendations for this PR:

Key Test Cases:

verify_kdumpcrash_single_core|verify_kdumpcrash_smp|verify_kdumpcrash_auto_size|verify_kdumpcrash_large_memory_auto_size

Impacted LISA Features:
Disk, StartStop, SerialConsole

Tested Azure Marketplace Images:

  • canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest
  • redhat rhel 9_5 latest
  • oracle oracle-linux ol94-lvm-gen2 latest
  • debian debian-12 12-gen2 latest
  • microsoftcblmariner azure-linux-3 azure-linux-3-gen2 latest

Rationale:

  • The test cases cover single-core, multi-core, auto-size crashkernel, and large memory scenarios which exercise the new disk provisioning and mount persistence logic
  • Oracle Linux images are critical to test the grubby command changes for crashkernel configuration
  • A variety of distributions ensures the fstab and disk management changes work across different OS families
  • Gen2 images are prioritized as they represent newer VM generations commonly used in production

adityagesh and others added 7 commits December 16, 2025 05:08
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@LiliDeng LiliDeng merged commit e513d72 into main Dec 18, 2025
57 checks passed
@LiliDeng LiliDeng deleted the aditya/kdump_fixes branch December 18, 2025 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants