Skip to content

Add Kdump option to disable reboot after save_core#10581

Open
nangelastro wants to merge 1 commit intomicrosoft:3.0-devfrom
nangelastro:nangelastro/add-kdump-option-for-disabling-reboot
Open

Add Kdump option to disable reboot after save_core#10581
nangelastro wants to merge 1 commit intomicrosoft:3.0-devfrom
nangelastro:nangelastro/add-kdump-option-for-disabling-reboot

Conversation

@nangelastro
Copy link
Copy Markdown

@nangelastro nangelastro commented Sep 30, 2024

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

  • The toolchain has been rebuilt successfully (or no changes were made to it)
  • The toolchain/worker package manifests are up-to-date
  • Any updated packages successfully build (or no packages were changed)
  • Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
  • Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • All package sources are available
  • cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • LICENSE-MAP files are up-to-date (./LICENSES-AND-NOTICES/SPECS/data/licenses.json, ./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md, ./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)
  • All source files have up-to-date hashes in the *.signatures.json files
  • sudo make go-tidy-all and sudo make go-test-coverage pass
  • Documentation has been updated to match any changes to the build system
  • Ready to merge

Summary

What does the PR accomplish, why was it needed?

By default, Kdump copies the entire vmcore to the disk and reboots the
system afterwards. While this works in most cases, it does not work for
systems hosted in RAM where the crash dump will be lost once rebooted.
To support this scenario, a new option in the kdump.conf,
save_core_to_ram, is added and commented out. Setting this option to 1
will allow a compressed crash dump to be produced by utilizing the
core_collector option if specified, otherwise the dmesg log will be
extracted from the vmcore. This is especially necessary because there is
no disk to save the dump to, and there is not enough space in the
pre-allocated crashkernel memory space to save an entire vmcore.

Change Log
  • kexec-tools
Does this affect the toolchain?

NO

Test Methodology
  • Pipeline build id: 662082
  • Full pipeline build id: 662087
  • option permutation:
    • save_core_to_ram 0 => observe original behavior
    • save_core_to_ram 1 => system is not rebooted and a compressed crash dump is saved to /var/crash/<date>/vmcore

@nangelastro nangelastro force-pushed the nangelastro/add-kdump-option-for-disabling-reboot branch from 234a553 to 0d883bb Compare September 30, 2024 19:21
@nangelastro
Copy link
Copy Markdown
Author

@nangelastro please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree company="Microsoft"

@nangelastro nangelastro marked this pull request as ready for review September 30, 2024 21:40
@nangelastro nangelastro requested a review from a team as a code owner September 30, 2024 21:40
#dracut_args --omit-drivers "cfg80211 snd" --add-drivers "ext2 ext3"
#fence_kdump_args -p 7410 -f auto -c 0 -i 10
#fence_kdump_nodes node1 node2
#disable_crash_dump_reboot 0 No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

please add new line at end of the file. I found description here: https://stackoverflow.com/a/77201456/22141712

@nangelastro nangelastro force-pushed the nangelastro/add-kdump-option-for-disabling-reboot branch from 0d883bb to 32cd179 Compare October 1, 2024 22:07
@nangelastro nangelastro force-pushed the nangelastro/add-kdump-option-for-disabling-reboot branch from 32cd179 to 094eb90 Compare October 2, 2024 00:18
@nangelastro nangelastro force-pushed the nangelastro/add-kdump-option-for-disabling-reboot branch from 094eb90 to 4612f09 Compare October 21, 2024 17:48
@nangelastro nangelastro requested a review from a team as a code owner October 21, 2024 17:48
@nangelastro nangelastro force-pushed the nangelastro/add-kdump-option-for-disabling-reboot branch 2 times, most recently from 91b8c61 to d959740 Compare October 21, 2024 23:37
@nangelastro nangelastro force-pushed the nangelastro/add-kdump-option-for-disabling-reboot branch from d959740 to c3d512b Compare December 13, 2024 20:45
@nangelastro nangelastro requested a review from a team as a code owner December 13, 2024 20:45
@nangelastro nangelastro force-pushed the nangelastro/add-kdump-option-for-disabling-reboot branch 4 times, most recently from 1145828 to 5438235 Compare December 17, 2024 19:47
@nangelastro nangelastro force-pushed the nangelastro/add-kdump-option-for-disabling-reboot branch from 5438235 to 9f3c740 Compare March 31, 2026 21:41
@microsoft-github-policy-service microsoft-github-policy-service bot added security 3.0-dev PRs Destined for AzureLinux 3.0 labels Mar 31, 2026
By default, Kdump copies the entire vmcore to the disk and reboots the
system afterwards. While this works in most cases, it does not work for
systems hosted in RAM where the crash dump will be lost once rebooted.
To support this scenario, a new option in the kdump.conf,
save_core_to_ram, is added and commented out. Setting this option to 1
will allow a compressed crash dump to be produced by utilizing the
core_collector option if specified, otherwise the dmesg log will be
extracted from the vmcore. This is especially necessary because there is
no disk to save the dump to, and there is not enough space in the
pre-allocated crashkernel memory space to save an entire vmcore.
@nangelastro nangelastro force-pushed the nangelastro/add-kdump-option-for-disabling-reboot branch from 9f3c740 to cb14ab9 Compare March 31, 2026 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.0-dev PRs Destined for AzureLinux 3.0 Packaging security

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants