[kdump-config] Update kdump default config with pre-defined value in /proc/cmdline (installer.conf) #237
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@judyjoseph and @arlakshm Here is master PR which handle kdump enabled in the platform installer.conf. Please review it. |
bc75b4e to
f990efe
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
…efined in a platform installer.conf Signed-off-by: mlok <[email protected]>
There was a problem hiding this comment.
Pull Request Overview
This PR updates the kdump configuration handling to automatically update the defaults if kdump is enabled via the platform's installer configuration found in /proc/cmdline. Key changes include:
- Adding a new method in KdumpCfg to read and parse /proc/cmdline for the "crashkernel=" parameter.
- Implementing a conditional update of the configuration database when discrepancies are detected.
- Introducing a new test case in hostcfgd_test.py to validate the new behavior.
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/hostcfgd/hostcfgd_test.py | Added a unit test to simulate /proc/cmdline based kdump config |
| scripts/hostcfgd | Introduces init_kdump_config_from_cmdline and adjusts update logic based on /proc/cmdline |
Files not reviewed (1)
- tests/proc/cmdline: Language not supported
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@judyjoseph and @arlakshm Please merge help to merge this PR |
|
@mlok-nokia an additional test would be to see the result when "crash-kernel" is present in /proc/cmdline and user configures via kdump CLI. Make sure it overwrites what is set in /proc/cmdline |
|
@kperumalbfn - could you please help cherry-pick this to 202411? |
|
included in 202411. removing 202412 tag. |
Why I did it
Modify the hostcfgd to handle the kdump enabled to the CONFIG_DB when kdump is enabled by default in the platform installer.conf . Related PR for 202405 is: #236
How I did it
Added a new method init_kdump_config_from_cmdline() in the KdumpCfg class to check the /proc/cmdline. If key "crashkernel=" exists in /proc/cmdline when system is up, this means that the kdump is enabled. init_kdump_config_from_cmdline() will update the kdump_defaults and CONFIG_DB when if the current config data are not matched the pre-defined data in the /proc/cmdline. This happens during a new image upgrade with the crashkernel is defined the platform installer.conf.
How to verify it
Which release branch to backport (provide reason below if selected)