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] Fix the error message when trying to enable kdump if kdump was already enabled #2582

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DennisChiuEC
Copy link

What I did

The following error message will be shown in the syslog by doing "sudo config kdump enable" when kdump was already enabled.
INFO hostcfgd[6930]: Error Unable to unload Kdump the kernel '%s' []
INFO hostcfgd[6930]: kdump is already enabled
ERR hostcfgd: sonic-kdump-config --enable - failed: return code - 1, output:#012None

The root cause is that there has some logical error in 'kdump_enable()' function

How I did it

Modified the logic in kdump_enable() which will return directly
when there does not need to apply any change after comparing to the expected
configuration and the current operational mode.

How to verify it

  1. Make sure kdump is already enabled.
  2. Do "sudo config kdump enable" again
  3. The error message will show in the syslog

Previous command output (if the output of a command-line utility has changed)

No command-line changed

New command output (if the output of a command-line utility has changed)

No command-line changed

… already enabled

If kdump is already enabled and a command is executed to enable kdump again,
the following message will be occurred in syslog.

INFO hostcfgd[6930]: Error Unable to unload Kdump the kernel '%s' []
INFO hostcfgd[6930]: kdump is already enabled
ERR hostcfgd: sonic-kdump-config --enable - failed: return code - 1, output:#012None

This commit modified the logic in kdump_enable() which will return directly
when there does not have to apply any change after comparing to the expected
configuration and the current operational mode.
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.

1 participant