[kdump-config] update kdump default config with pre-defined value in /proc/cmdline (installer.conf) (cherry-pick from master to 202405)#236
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@judyjoseph and @arlakshm This PRs the set the Kdump config enabled and memory value which based on the pre-defined crashkernel in /proc/cmdline. Please review it. Thanks |
|
@mlok-nokia, as discussed can we create PR in master branch for this change? |
I am working on that..... |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
906a7a5 to
0180251
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
0180251 to
6b386db
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
…efined in a platform installer.conf Signed-off-by: mlok <marty.lok@nokia.com> (cherry picked from commit bc75b4e5a40e40e49f4352c810b28dedd385d16b)
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@judyjoseph and @arlakshm This is the cherry-pick of PR of the kdump-config. Please review it. Thanks. |
|
@judyjoseph This PR also needs to cherry-pick to 202503 branch |
|
@judyjoseph @arlakshm Please cherry-pick this PR to 202503 branch. Thanks. |
|
@tjchadaga, @judyjoseph and @arlakshm This PR has not been cherry-picked to MSFT 202503 branch yet. Thanks |
…/proc/cmdline (installer.conf) #### 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: sonic-net#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 1) install an image with predefine kdump enabled in the grub.conf. 2) execute the "config load_minigraph" - check it should not any error in the syslog - After the hostcfgd is running, execute "show kdump config" should show kdump is enabled. Output as below ``` admin@sonic:~$ show kdump config Kdump administrative mode: Enabled Kdump operational mode: Ready Kdump memory reservation: 8G-:1G Maximum number of Kdump files: 3 ``` 3) save config and reboot the system 4) show command should show the kdump is enabled and also there should not be any kdump/hostcfgd error log in syslog ### Which release branch to backport (provide reason below if selected) - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 - [ ] 202111 - [ ] 202205 - [ ] 202211 - [ ] 202305 - [x] 202405
…-defined value in /proc/cmdline (installer.conf) (#315) #### 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 1) install an image with predefine kdump enabled in the grub.conf. 2) execute the "config load_minigraph" - check it should not any error in the syslog - After the hostcfgd is running, execute "show kdump config" should show kdump is enabled. Output as below ``` admin@sonic:~$ show kdump config Kdump administrative mode: Enabled Kdump operational mode: Ready Kdump memory reservation: 8G-:1G Maximum number of Kdump files: 3 ``` 3) save config and reboot the system 4) show command should show the kdump is enabled and also there should not be any kdump/hostcfgd error log in syslog ### Which release branch to backport (provide reason below if selected) - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 - [ ] 202111 - [ ] 202205 - [ ] 202211 - [ ] 202305 - [x] 202405
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 in master branch is #237
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)