-
Notifications
You must be signed in to change notification settings - Fork 224
Improve Kdump test suite #4148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Improve Kdump test suite #4148
Conversation
adityagesh
commented
Dec 9, 2025
- Kdump currently has a lot of failures when sufficient disk space is not present, add disk using platform when additional space is required.
- 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.
- Refactoring
| """ | ||
| from lisa.features import Disk | ||
|
|
||
| # Check if Disk feature is supported on this platform | ||
| if not self.node.features.is_supported(Disk): | ||
| raise LisaException("Disk feature is not supported on this platform") | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LiliDeng , I remember Chi mentioning tool should not import feature. But I do not see any other way to solve this. Do you have any suggestion?
There was a problem hiding this 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
Fstabtool for managing/etc/fstabentries 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 latestredhat rhel 9_5 latestoracle oracle-linux ol94-lvm-gen2 latestdebian debian-12 12-gen2 latestmicrosoftcblmariner 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
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>
da16486 to
90762b0
Compare
| device_str = f"UUID={partition_info.uuid}" | ||
| self._log.debug(f"Using UUID for device {device}: {device_str}") | ||
| else: | ||
| self._log.warning( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't use warning
| f"Could not get UUID for {device}, using device name" | ||
| ) | ||
| except LisaException as e: | ||
| self._log.warning( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't use warning