Skip to content
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

Enable Kdump config by default for cisco-8000 #16224

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

amnsinghal
Copy link
Contributor

Why I did it

Enabling kdump by default for cisco-8000 by setting crashkernel cmdline arg in device installer.conf.
After bootup, sonic-kdump-config wipes crashkernel arg from /host/grub/grub.cfg, and resets USE_KDUMP in /etc/default/kdump-tools, so kdump will not be enabled on subsequent reboot.

How I did it

Setting kdump enable config as part of init_cfg.json for cisco-8000 platforms.

How to verify it

Install SONiC image with kdump enabled by default (device/hwsku/installer.conf), then reboot.
Kdump config should persist on subsequent reboots and kdump loaded during bootup.

Which release branch to backport (provide reason below if selected)

  • 202205

Description for the changelog

Enabling kdump by default for cisco-8000 platforms.

Signed-off-by: Aman Singhal <amans@cisco.com>
@amnsinghal amnsinghal requested a review from lguohan as a code owner August 21, 2023 19:09
@lguohan
Copy link
Collaborator

lguohan commented Aug 21, 2023

how is this tested, can you provide the test results?

@amnsinghal
Copy link
Contributor Author

amnsinghal commented Aug 21, 2023

how is this tested, can you provide the test results?

Appended crashkernel argument in cisco-8000 device installer.conf:ONIE_PLATFORM_EXTRA_CMDLINE_LINUX, which will be used by onie-nos-install and sonic-installer to populate /host/grub/grub.cfg on image installation, and subsequently, kernel cmdline as well on first bootup.

Kdump kernel gets loaded by default on first boot:

[    6.428765] kdump-tools[447]: Starting kdump-tools:
[    6.444362] kdump-tools[496]: Creating symlink /var/lib/kdump/vmlinuz
[    6.520369] kdump-tools[549]: kdump-tools: Generating /var/lib/kdump/initrd.img-5.10.0-18-2-amd64
[   19.184133] kdump-tools[496]: Creating symlink /var/lib/kdump/initrd.img
[   19.781713] kdump-tools[496]: loaded kdump kernel.

Also, kdump can still be disabled from config kdump CLI, it will supersede this new default behavior.

Kernel panic invoked thru sysrq-trigger and memory exhaustion.

Cases covered:

  1. show kdump logging
  2. show kdump files
  3. config kdump memory 512M
  4. config kdump num_dumps 5
  5. config kdump disable
  6. crash decode

@amnsinghal
Copy link
Contributor Author

@lguohan Pls let me know if you need more details, thanks.

@amnsinghal
Copy link
Contributor Author

@lguohan Can you pls approve/merge, if no further comments, thanks.

@lguohan lguohan merged commit e22136d into sonic-net:master Sep 7, 2023
@lguohan
Copy link
Collaborator

lguohan commented Sep 7, 2023

@amnsinghal , thank for the contribution. however, we won't backport this since this is a feature, not a bugfix.

@amnsinghal
Copy link
Contributor Author

@lguohan Thanks for merging, can you pls raise request for cherry-picking to 202305.

sonic-otn pushed a commit to sonic-otn/sonic-buildimage that referenced this pull request Sep 20, 2023
Why I did it
Enabling kdump by default for cisco-8000 by setting crashkernel cmdline arg in device installer.conf.
After bootup, sonic-kdump-config wipes crashkernel arg from /host/grub/grub.cfg, and resets USE_KDUMP in /etc/default/kdump-tools, so kdump will not be enabled on subsequent reboot.

How I did it
Setting kdump enable config as part of init_cfg.json for cisco-8000 platforms.

How to verify it
Install SONiC image with kdump enabled by default (device/hwsku/installer.conf), then reboot.
Kdump config should persist on subsequent reboots and kdump loaded during bootup

Signed-off-by: Aman Singhal <amans@cisco.com>
@gechiang gechiang added Chassis 🤖 Modular chassis support Chassis for 202205 branch PRs needed for 202205 branch in msft repo Included in Chassis for 202205 Branch Indicate PR is already in MSFT repo 202205 branch labels Sep 21, 2023
@amnsinghal
Copy link
Contributor Author

@lguohan @prgeor Can you pls request for cherry-picking to 202305, thanks.

@amnsinghal
Copy link
Contributor Author

@prgeor Thanks for adding 202305 label, who can help with the cherry-pick?

@prgeor
Copy link
Contributor

prgeor commented Oct 5, 2023

@StormLiangMS to cherry pick to 202305

@StormLiangMS
Copy link
Contributor

StormLiangMS commented Oct 7, 2023

@amnsinghal have you tested with 202305?

@amnsinghal
Copy link
Contributor Author

@amnsinghal have you tested with 202305?

@StormLiangMS yes, validated with 202305 build on Cisco 8111-32eh-o platform. Pls help cherry-pick to 202305, if no further concerns, thanks!

mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request Oct 17, 2023
Why I did it
Enabling kdump by default for cisco-8000 by setting crashkernel cmdline arg in device installer.conf.
After bootup, sonic-kdump-config wipes crashkernel arg from /host/grub/grub.cfg, and resets USE_KDUMP in /etc/default/kdump-tools, so kdump will not be enabled on subsequent reboot.

How I did it
Setting kdump enable config as part of init_cfg.json for cisco-8000 platforms.

How to verify it
Install SONiC image with kdump enabled by default (device/hwsku/installer.conf), then reboot.
Kdump config should persist on subsequent reboots and kdump loaded during bootup

Signed-off-by: Aman Singhal <amans@cisco.com>
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202305: #16910

mssonicbld pushed a commit that referenced this pull request Oct 17, 2023
Why I did it
Enabling kdump by default for cisco-8000 by setting crashkernel cmdline arg in device installer.conf.
After bootup, sonic-kdump-config wipes crashkernel arg from /host/grub/grub.cfg, and resets USE_KDUMP in /etc/default/kdump-tools, so kdump will not be enabled on subsequent reboot.

How I did it
Setting kdump enable config as part of init_cfg.json for cisco-8000 platforms.

How to verify it
Install SONiC image with kdump enabled by default (device/hwsku/installer.conf), then reboot.
Kdump config should persist on subsequent reboots and kdump loaded during bootup

Signed-off-by: Aman Singhal <amans@cisco.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved for 202305 Branch Chassis for 202205 branch PRs needed for 202205 branch in msft repo Chassis 🤖 Modular chassis support Included in Chassis for 202205 Branch Indicate PR is already in MSFT repo 202205 branch Included in 202305 Branch Request for 202305 Branch
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants