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

kdump support #3722

Merged
merged 2 commits into from
Nov 9, 2019
Merged

kdump support #3722

merged 2 commits into from
Nov 9, 2019

Conversation

olivier-singla
Copy link
Contributor

@olivier-singla olivier-singla commented Nov 7, 2019

In the event of a kernel crash, we need to gather as much information as possible to understand and identify the root cause of the crash. Currently, the kernel does not provide much information, which make kernel crash investigation difficult and time consuming.

Fortunately, there is a way in the kernel to provide more information in the case of a kernel crash. kdump is a feature of the Linux kernel that creates crash dumps in the event of a kernel crash. This PR will add kernel kdump support. Please note that there is another PR in sonic-utilities which is also needed:
sonic-net/sonic-utilities#729

An extension to the CLI utilities config and show is provided to configure and manage kdump:

  • view kdump status (enabled/disabled, active, configuration, stored crash files)
  • enable / disable kdump functionality
  • configure kdump (how many kernel crash logs can be saved, memory
    allocated for capture kernel)
  • view kernel crash logs

There is a design document which describes this kdump implementation:
sonic-net/SONiC#510

- What I did
Added kdump support

- How I did it
Please read HLD:
sonic-net/SONiC#510

- How to verify it
config kdump enable
config save
reboot
echo 1 > /proc/sys/kernel/sysrq ; echo c > /proc/sysrq-trigger
show kdump
show kdump log 1 20

as possible to understand and identify the root cause of the crash.
Currently, the kernel does not provide much information, which make
kernel crash investigation difficult and time consuming.

Fortunately, there is a way in the kernel to provide more information
in the case of a kernel crash. kdump is a feature of the Linux kernel
that creates crash dumps in the event of a kernel crash. This PR
will add kermel kdump support.

An extension to the CLI utilities config and show is provided to
configure and manage kdump:
 - enable / disable kdump functionality
 - configure kdump (how many kernel crash logs can be saved, memory
   allocated for capture kernel)
 - view kernel crash logs
@lguohan
Copy link
Collaborator

lguohan commented Nov 9, 2019

retest broadcom please

@lguohan lguohan merged commit c70d8bc into sonic-net:master Nov 9, 2019
@@ -160,6 +160,10 @@ sudo dpkg --root=$FILESYSTEM_ROOT -i $debs_path/libnss-tacplus_*.deb || \
sudo LANG=C chroot $FILESYSTEM_ROOT pam-auth-update --remove tacplus
sudo sed -i -e '/^passwd/s/ tacplus//' $FILESYSTEM_ROOT/etc/nsswitch.conf

# Install a custom version of kdump-tools (and its dependencies via 'apt-get -y install -f')
sudo DEBIAN_FRONTEND=noninteractive dpkg --root=$FILESYSTEM_ROOT -i $debs_path/kdump-tools_*.deb || \
sudo LANG=C DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=truechroot $FILESYSTEM_ROOT apt-get -q --no-install-suggests --no-install-recommends --force-no install
Copy link
Contributor

@banagiri banagiri Dec 23, 2019

Choose a reason for hiding this comment

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

space is missing for the option and the command DEBCONF_NONINTERACTIVE_SEEN=truechroot

zhenggen-xu pushed a commit to zhenggen-xu/sonic-buildimage that referenced this pull request Jan 10, 2020
* In the event of a kernel crash, we need to gather as much information
as possible to understand and identify the root cause of the crash.
Currently, the kernel does not provide much information, which make
kernel crash investigation difficult and time consuming.

Fortunately, there is a way in the kernel to provide more information
in the case of a kernel crash. kdump is a feature of the Linux kernel
that creates crash dumps in the event of a kernel crash. This PR
will add kermel kdump support.

An extension to the CLI utilities config and show is provided to
configure and manage kdump:
 - enable / disable kdump functionality
 - configure kdump (how many kernel crash logs can be saved, memory
   allocated for capture kernel)
 - view kernel crash logs
lguohan pushed a commit to sonic-net/sonic-utilities that referenced this pull request Jan 25, 2020
In the event of a kernel crash, we need to gather as much information as possible to understand and identify the root cause of the crash. Currently, the kernel does not provide much information, which make kernel crash investigation difficult and time consuming.

Fortunately, there is a way in the kernel to provide more information in the case of a kernel crash. kdump is a feature of the Linux kernel that creates crash dumps in the event of a kernel crash. This PR will add kernel kdump support. Please note that there is another PR in sonic-utilities which is also needed:
sonic-net/sonic-buildimage#3722

An extension to the CLI utilities config and show is provided to configure and manage kdump:

view kdump status (enabled/disabled, active, configuration, stored crash files)
enable / disable kdump functionality
configure kdump (how many kernel crash logs can be saved, memory
allocated for capture kernel)
view kernel crash logs
There is a design document which describes this kdump implementation:
sonic-net/SONiC#510
malletvapid23 added a commit to malletvapid23/Sonic-Utility that referenced this pull request Aug 3, 2023
In the event of a kernel crash, we need to gather as much information as possible to understand and identify the root cause of the crash. Currently, the kernel does not provide much information, which make kernel crash investigation difficult and time consuming.

Fortunately, there is a way in the kernel to provide more information in the case of a kernel crash. kdump is a feature of the Linux kernel that creates crash dumps in the event of a kernel crash. This PR will add kernel kdump support. Please note that there is another PR in sonic-utilities which is also needed:
sonic-net/sonic-buildimage#3722

An extension to the CLI utilities config and show is provided to configure and manage kdump:

view kdump status (enabled/disabled, active, configuration, stored crash files)
enable / disable kdump functionality
configure kdump (how many kernel crash logs can be saved, memory
allocated for capture kernel)
view kernel crash logs
There is a design document which describes this kdump implementation:
sonic-net/SONiC#510
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants