Skip to content

Commit

Permalink
kdumpctl: deprecate --reboot for reset-creashkernel
Browse files Browse the repository at this point in the history
The --reboot option for reset-crashkernel causes quite some confusion.
Especially, there are different expectations when --reboot shall reboot
the system. The current code only reboots the system when the
crashkernel parameter was updated during this run. But there are other
opinions, that --reboot shall also reboot the system if a previous run
of `kdumpctl reset-crashkernel` updated the crashkernel parameter and no
reboot occurred yet. While possible this would add extra complexity to
the code. Neither the confusion nor the extra complexity are justified,
given that --reboot only replaces a single additional command for the
user.

Thus deprecate the --reboot option so it can be removed later on.

Signed-off-by: Philipp Rudo <[email protected]>
  • Loading branch information
prudo1 authored and coiby committed Nov 4, 2024
1 parent c196f5b commit ca6da9b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions crashkernel-howto.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ Reset using kdumpctl
To make it easier to reset the `crashkernel=` kernel cmdline to this default
value properly, `kdumpctl` also provides a sub-command:

`kdumpctl reset-crashkernel [--kernel=path_to_kernel] [--reboot]`
`kdumpctl reset-crashkernel [--kernel=path_to_kernel]`

This command will reset the bootloader's kernel cmdline to the default value.
It will also update bootloader config if the bootloader has a standalone config
file. User will have to reboot the machine after this command to make it take
effect if --reboot is not specified. For more details, please refer to the
reset-crashkernel command in `man kdumpctl`.
effect. For more details, please refer to the reset-crashkernel command in `man
kdumpctl`.

Reset manually
--------------
Expand Down
4 changes: 4 additions & 0 deletions kdumpctl
Original file line number Diff line number Diff line change
Expand Up @@ -1494,6 +1494,10 @@ reset_crashkernel()
_grubby_kernel_path=$_val
;;
--reboot)
# --reboot option was deprecated with
# kdump-utils v1.0.45. Keep the code for now to
# not break any user setup.
dwarn "Option --reboot is deprecated and will be removed in the future."
_reboot=yes
;;
*)
Expand Down
6 changes: 1 addition & 5 deletions kdumpctl.8
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ based on the current kdump setup, and list some details of memory usage.
.I get-default-crashkernel
Return the default crashkernel value provided by kexec-tools.
.TP
.I reset-crashkernel [--kernel=path_to_kernel] [--reboot]
.I reset-crashkernel [--kernel=path_to_kernel]
Reset crashkernel to default value recommended by kexec-tools. If no kernel
is specified, will reset KDUMP_KERNELVER if it's defined in /etc/sysconfig/kdump
or the current running kernel's crashkernel value if KDUMP_KERNELVER is empty. You can
Expand All @@ -62,10 +62,6 @@ grubby's kernel-path=ALL and kernel-path=DEFAULT. ppc64le supports FADump and
supports an additional [--fadump=[on|off|nocma]] parameter to toggle FADump
on/off.

If the optional parameter [--reboot] is provided the system will automatically
reboot for changes to take effect. If no changes were made to the kernel
command line the reboot is omitted.

Note: The memory requirements for kdump varies heavily depending on the
used hardware and system configuration. Thus the recommended
crashkernel might not work for your specific setup. Please test if
Expand Down

0 comments on commit ca6da9b

Please sign in to comment.