-
Notifications
You must be signed in to change notification settings - Fork 134
[action] [PR:237] [kdump-config] Update kdump default config with pre-defined value in /proc/cmdline (installer.conf) #315
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
Conversation
…/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
|
Original PR: #237 |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@arista-nwolfe, @mlok-nokia - could you help check the UT failures on this? |
It looks like the PRs which added the arguments You'll probably need to remove those expected calls from the test case |
Correct. These 3 default setting are not in 202503 branch. |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
<!--
Please make sure you've read and understood our contributing guidelines:
https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md
** Make sure all your commits include a signature generated with `git
commit -s` **
If this is a bug fix, make sure your description includes "fixes #xxxx",
or
"closes #xxxx" or "resolves #xxxx"
Please provide the following information:
-->
#### Why I did it
To pick up hostcfgd fix to enable kdump on bootup
##### Work item tracking
- Microsoft ADO **(number only)**:
#### How I did it
Update submodule to include
sonic-net/sonic-host-services#315
#### How to verify it
<!--
If PR needs to be backported, then the PR must be tested against the
base branch and the earliest backport release branch and provide tested
image version on these two branches. For example, if the PR is requested
for master, 202211 and 202012, then the requester needs to provide test
results on master and 202012.
-->
#### Which release branch to backport (provide reason below if selected)
<!--
- Note we only backport fixes to a release branch, *not* features!
- Please also provide a reason for the backporting below.
- e.g.
- [x] 202006
-->
- [ ] 201811
- [ ] 201911
- [ ] 202006
- [ ] 202012
- [ ] 202106
- [ ] 202111
- [ ] 202205
- [ ] 202211
#### Tested branch (Please provide the tested image version)
<!--
- Please provide tested image version
- e.g.
- [x] 20201231.100
-->
- [ ] <!-- image version 1 -->
- [ ] <!-- image version 2 -->
#### Description for the changelog
<!--
Write a short (one line) summary that describes the changes in this
pull request for inclusion in the changelog:
-->
<!--
Ensure to add label/tag for the feature raised. example - PR#2174 under
sonic-utilities repo. where, Generic Config and Update feature has been
labelled as GCU.
-->
#### Link to config_db schema for YANG module changes
<!--
Provide a link to config_db schema for the table for which YANG model
is defined
Link should point to correct section on
https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md
-->
#### A picture of a cute animal (not mandatory but encouraged)
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)