If a crash occurs repeatedly after enabling kdump, the system goes into a crash loop and the dump target may get filled up by vmcores. This is likely especially with early kdump.
This patchset introduces 'final_action' option to kdump.conf, in order for users to be able to power off the system even after capturing a vmcore successfully.
In preparation for adding 'final_action' option, since it's confusing to have the 'final_action' and 'default' options at the same time, this patchset introduces 'failure_action' as an alias of the 'default' option to /etc/kdump.conf, and makes 'default' obsolete to be removed in the future. Also, the "default action" term is renamed to "failure action".
Changes from v1: - Add a patch that introduces 'failure_action' option as an alias of 'default' option and make 'default' option obsolete. - Improve some descriptions of 'final_action' behavior. - Add a description that early kdump user can choose anything other than "reboot" as failure_action to avoid crash loop.
Kazuhito Hagio (3): Add failure_action as alias of default and make default obsolete Add final_action option to kdump.conf earlykdump: Add a note of final_action option to avoid crash loop
dracut-kdump-error-handler.service | 2 +- dracut-kdump-error-handler.sh | 2 +- early-kdump-howto.txt | 15 +++++++++- fadump-howto.txt | 15 +++++----- kdump-lib-initramfs.sh | 33 ++++++++++++++------- kdump-lib.sh | 6 ++-- kdump.conf | 24 ++++++++++++---- kdump.conf.5 | 24 +++++++++++++--- kdumpctl | 46 +++++++++++++++++++++++++----- kexec-kdump-howto.txt | 12 ++++---- 10 files changed, 133 insertions(+), 46 deletions(-)
In preparation for adding 'final_action' option, since it's confusing to have the 'final_action' and 'default' options at the same time, this patch introduces 'failure_action' as an alias of the 'default' option to /etc/kdump.conf, and makes 'default' obsolete to be removed in the future.
Also, the "default action" term is renamed to "failure action".
Signed-off-by: Kazuhito Hagio k-hagio@ab.jp.nec.com Cc: Dave Young dyoung@redhat.com Cc: Lianbo Jiang lijiang@redhat.com Cc: Bhupesh Sharma bhsharma@redhat.com --- dracut-kdump-error-handler.service | 2 +- dracut-kdump-error-handler.sh | 2 +- fadump-howto.txt | 12 +++++----- kdump-lib-initramfs.sh | 20 ++++++++-------- kdump-lib.sh | 6 ++--- kdump.conf | 12 ++++++---- kdump.conf.5 | 10 ++++++-- kdumpctl | 38 ++++++++++++++++++++---------- kexec-kdump-howto.txt | 12 +++++----- 9 files changed, 68 insertions(+), 46 deletions(-)
diff --git a/dracut-kdump-error-handler.service b/dracut-kdump-error-handler.service index 13090be..32b74ab 100644 --- a/dracut-kdump-error-handler.service +++ b/dracut-kdump-error-handler.service @@ -6,7 +6,7 @@ # (at your option) any later version.
# This service will run the real kdump error handler code. Executing the -# default action configured in kdump.conf +# failure action configured in kdump.conf
[Unit] Description=Kdump Error Handler diff --git a/dracut-kdump-error-handler.sh b/dracut-kdump-error-handler.sh index 2f0f1d1..fc2b932 100755 --- a/dracut-kdump-error-handler.sh +++ b/dracut-kdump-error-handler.sh @@ -6,5 +6,5 @@ set -o pipefail export PATH=$PATH:$KDUMP_SCRIPT_DIR
get_kdump_confs -do_default_action +do_failure_action do_final_action diff --git a/fadump-howto.txt b/fadump-howto.txt index be17da3..2730f4b 100644 --- a/fadump-howto.txt +++ b/fadump-howto.txt @@ -71,8 +71,8 @@ The control flow of fadump works as follows: process.) 09. Captures dump according to /etc/kdump.conf 10. Is dump capture successful (yes goto 12, no goto 11) -11. Perfom the default action specified in /etc/kdump.conf (Default action - is reboot, if unspecified) +11. Perform the failure action specified in /etc/kdump.conf + (The default failure action is reboot, if unspecified) 12. Reboot
@@ -227,12 +227,12 @@ to initate the dump and then click "Restart blade with NMI". This issues a system reset and invokes xmon debugger.
-Advanced Setups & Default action: +Advanced Setups & Failure action:
-Kdump and fadump exhibit similar behavior in terms of setup & default action. +Kdump and fadump exhibit similar behavior in terms of setup & failure action. For fadump advanced setup related information see section "Advanced Setups" in -"kexec-kdump-howto.txt" document. Refer to "Default action" section in "kexec- -kdump-howto.txt" document for fadump default action related information. +"kexec-kdump-howto.txt" document. Refer to "Failure action" section in "kexec- +kdump-howto.txt" document for fadump failure action related information.
Compression and filtering
diff --git a/kdump-lib-initramfs.sh b/kdump-lib-initramfs.sh index f5155a4..8df2b6c 100755 --- a/kdump-lib-initramfs.sh +++ b/kdump-lib-initramfs.sh @@ -6,7 +6,7 @@ KDUMP_PATH="/var/crash" CORE_COLLECTOR="" DEFAULT_CORE_COLLECTOR="makedumpfile -l --message-level 1 -d 31" DMESG_COLLECTOR="/sbin/vmcore-dmesg" -DEFAULT_ACTION="systemctl reboot -f" +FAILURE_ACTION="systemctl reboot -f" DATEDIR=`date +%Y-%m-%d-%T` HOST_IP='127.0.0.1' DUMP_INSTRUCTION="" @@ -51,22 +51,22 @@ get_kdump_confs() fence_kdump_nodes) FENCE_KDUMP_NODES="$config_val" ;; - default) + failure_action|default) case $config_val in shell) - DEFAULT_ACTION="kdump_emergency_shell" + FAILURE_ACTION="kdump_emergency_shell" ;; reboot) - DEFAULT_ACTION="systemctl reboot -f" + FAILURE_ACTION="systemctl reboot -f" ;; halt) - DEFAULT_ACTION="halt" + FAILURE_ACTION="halt" ;; poweroff) - DEFAULT_ACTION="systemctl poweroff -f" + FAILURE_ACTION="systemctl poweroff -f" ;; dump_to_rootfs) - DEFAULT_ACTION="dump_to_rootfs" + FAILURE_ACTION="dump_to_rootfs" ;; esac ;; @@ -159,10 +159,10 @@ kdump_emergency_shell() rm -f /etc/profile }
-do_default_action() +do_failure_action() { - echo "Kdump: Executing default action $DEFAULT_ACTION" - eval $DEFAULT_ACTION + echo "Kdump: Executing failure action $FAILURE_ACTION" + eval $FAILURE_ACTION }
do_final_action() diff --git a/kdump-lib.sh b/kdump-lib.sh index 6acab8c..36a1043 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -149,10 +149,10 @@ get_block_dump_target()
is_dump_to_rootfs() { - grep "^default[[:space:]]dump_to_rootfs" /etc/kdump.conf >/dev/null + grep -E "^(failure_action|default)[[:space:]]dump_to_rootfs" /etc/kdump.conf >/dev/null }
-get_default_action_target() +get_failure_action_target() { local _target
@@ -181,7 +181,7 @@ get_kdump_targets() fi
# Add the root device if dump_to_rootfs is specified. - _root=$(get_default_action_target) + _root=$(get_failure_action_target) if [ -n "$_root" -a "$kdump_targets" != "$_root" ]; then kdump_targets="$kdump_targets $_root" fi diff --git a/kdump.conf b/kdump.conf index 286ad27..1c7408a 100644 --- a/kdump.conf +++ b/kdump.conf @@ -6,8 +6,8 @@ # processed. # # Currently, only one dump target and path can be specified. If the dumping to -# the configured target fails, the default action which can be configured via -# the "default" directive will be performed. +# the configured target fails, the failure action which can be configured via +# the "failure_action" directive will be performed. # # Supported options: # @@ -99,7 +99,7 @@ # Multiple modules can be listed, separated by spaces, and any # dependent modules will automatically be included. # -# default <reboot | halt | poweroff | shell | dump_to_rootfs> +# failure_action <reboot | halt | poweroff | shell | dump_to_rootfs> # - Action to perform in case dumping fails. # reboot: Reboot the system. # halt: Halt the system. @@ -110,6 +110,10 @@ # reboot. Useful when non-root dump target is specified. # The default option is "reboot". # +# default <reboot | halt | poweroff | shell | dump_to_rootfs> +# - Same as the "failure_action" directive above, but this directive +# is obsolete and will be removed in the future. +# # force_rebuild <0 | 1> # - By default, kdump initrd will only be rebuilt when necessary. # Specify 1 to force rebuilding kdump initrd every time when kdump @@ -155,7 +159,7 @@ core_collector makedumpfile -l --message-level 1 -d 31 #kdump_pre /var/crash/scripts/kdump-pre.sh #extra_bins /usr/bin/lftp #extra_modules gfs2 -#default shell +#failure_action shell #force_rebuild 1 #force_no_rebuild 1 #dracut_args --omit-drivers "cfg80211 snd" --add-drivers "ext2 ext3" diff --git a/kdump.conf.5 b/kdump.conf.5 index 990076e..c7098c9 100644 --- a/kdump.conf.5 +++ b/kdump.conf.5 @@ -148,7 +148,7 @@ modules can be listed, separated by spaces, and any dependent modules will automatically be included. .RE
-.B default <reboot | halt | poweroff | shell | dump_to_rootfs> +.B failure_action <reboot | halt | poweroff | shell | dump_to_rootfs> .RS Action to perform in case dumping to the intended target fails. The default is "reboot". reboot: Reboot the system (this is what most people will want, as it returns the system @@ -156,10 +156,16 @@ to a normal state). halt: Halt the system and lose the vmcore. poweroff: The s will be powered down. shell: Drop to a shell session inside the initramfs, from which you can manually perform additional recovery actions. Exiting this shell reboots the system. Note: kdump uses bash as the default shell. dump_to_rootfs: If non-root dump -target is specified, the default action can be set as dump_to_rootfs. That means when +target is specified, the failure action can be set as dump_to_rootfs. That means when dumping to target fails, dump vmcore to rootfs from initramfs context and reboot. .RE
+.B default <reboot | halt | poweroff | shell | dump_to_rootfs> +.RS +Same as the "failure_action" directive above, but this directive is obsolete +and will be removed in the future. +.RE + .B force_rebuild <0 | 1> .RS By default, kdump initrd will only be rebuilt when necessary. diff --git a/kdumpctl b/kdumpctl index ca47705..25d9c28 100755 --- a/kdumpctl +++ b/kdumpctl @@ -228,7 +228,7 @@ check_config() case "$config_opt" in #* | "") ;; - raw|ext2|ext3|ext4|minix|btrfs|xfs|nfs|ssh|sshkey|path|core_collector|kdump_post|kdump_pre|extra_bins|extra_modules|default|force_rebuild|force_no_rebuild|dracut_args|fence_kdump_args|fence_kdump_nodes) + raw|ext2|ext3|ext4|minix|btrfs|xfs|nfs|ssh|sshkey|path|core_collector|kdump_post|kdump_pre|extra_bins|extra_modules|failure_action|default|force_rebuild|force_no_rebuild|dracut_args|fence_kdump_args|fence_kdump_nodes) # remove inline comments after the end of a directive. config_val=$(strip_comments $config_val) [ -z "$config_val" ] && { @@ -247,7 +247,7 @@ check_config() esac done < $KDUMP_CONFIG_FILE
- check_default_config || return 1 + check_failure_action_config || return 1
check_fence_kdump_config || return 1
@@ -935,23 +935,35 @@ start_dump() return $? }
-check_default_config() +check_failure_action_config() { local default_option + local failure_action + local option="failure_action"
default_option=$(awk '$1 ~ /^default$/ {print $2;}' $KDUMP_CONFIG_FILE) - if [ -z "$default_option" ]; then + failure_action=$(awk '$1 ~ /^failure_action$/ {print $2;}' $KDUMP_CONFIG_FILE) + + if [ -z "$failure_action" -a -z "$default_option" ]; then return 0 - else - case "$default_option" in - reboot|halt|poweroff|shell|dump_to_rootfs) - return 0 - ;; - *) - echo $"Usage kdump.conf: default {reboot|halt|poweroff|shell|dump_to_rootfs}" - return 1 - esac + elif [ -n "$failure_action" -a -n "$default_option" ]; then + echo "Cannot specify 'failure_action' and 'default' option together" + return 1 + fi + + if [ -n "$default_option" ]; then + option="default" + failure_action="$default_option" fi + + case "$failure_action" in + reboot|halt|poweroff|shell|dump_to_rootfs) + return 0 + ;; + *) + echo $"Usage kdump.conf: $option {reboot|halt|poweroff|shell|dump_to_rootfs}" + return 1 + esac }
start() diff --git a/kexec-kdump-howto.txt b/kexec-kdump-howto.txt index f46563f..011a19f 100644 --- a/kexec-kdump-howto.txt +++ b/kexec-kdump-howto.txt @@ -463,21 +463,21 @@ storage device, such as an iscsi target disk or clustered file system, you may need to manually specify additional kernel modules to load into your kdump initrd.
-Default action +Failure action ============== -Default action specifies what to do when dump to configured dump target -fails. By default, default action is "reboot" and that is system reboots +Failure action specifies what to do when dump to configured dump target +fails. By default, failure action is "reboot" and that is system reboots if attempt to save dump to dump target fails.
-There are other default actions available though. +There are other failure actions available though.
- dump_to_rootfs This option tries to mount root and save dump on root filesystem in a path specified by "path". This option will generally make sense when dump target is not root filesystem. For example, if dump is being saved over network using "ssh" then one can specify - default to "dump_to_rootfs" to try saving dump to root filesystem - if dump over network fails. + failure action to "dump_to_rootfs" to try saving dump to root + filesystem if dump over network fails.
- shell Drop into a shell session inside initramfs.
If a crash occurs repeatedly after enabling kdump, the system goes into a crash loop and the dump target may get filled up by vmcores. This is likely especially with early kdump.
This patch introduces 'final_action' option to kdump.conf, in order for users to be able to power off the system even after capturing a vmcore successfully.
Signed-off-by: Kazuhito Hagio k-hagio@ab.jp.nec.com Cc: Dave Young dyoung@redhat.com Cc: Lianbo Jiang lijiang@redhat.com Cc: Bhupesh Sharma bhsharma@redhat.com --- fadump-howto.txt | 3 ++- kdump-lib-initramfs.sh | 13 +++++++++++++ kdump.conf | 12 ++++++++++-- kdump.conf.5 | 14 ++++++++++++-- kdumpctl | 22 +++++++++++++++++++++- 5 files changed, 58 insertions(+), 6 deletions(-)
diff --git a/fadump-howto.txt b/fadump-howto.txt index 2730f4b..7061f02 100644 --- a/fadump-howto.txt +++ b/fadump-howto.txt @@ -73,7 +73,8 @@ The control flow of fadump works as follows: 10. Is dump capture successful (yes goto 12, no goto 11) 11. Perform the failure action specified in /etc/kdump.conf (The default failure action is reboot, if unspecified) -12. Reboot +12. Perform the final action specified in /etc/kdump.conf + (The default final action is reboot, if unspecified)
How to configure fadump: diff --git a/kdump-lib-initramfs.sh b/kdump-lib-initramfs.sh index 8df2b6c..d6c01d1 100755 --- a/kdump-lib-initramfs.sh +++ b/kdump-lib-initramfs.sh @@ -70,6 +70,19 @@ get_kdump_confs() ;; esac ;; + final_action) + case $config_val in + reboot) + FINAL_ACTION="systemctl reboot -f" + ;; + halt) + FINAL_ACTION="halt" + ;; + poweroff) + FINAL_ACTION="systemctl poweroff -f" + ;; + esac + ;; esac done < $KDUMP_CONF
diff --git a/kdump.conf b/kdump.conf index 1c7408a..1f0fc2d 100644 --- a/kdump.conf +++ b/kdump.conf @@ -105,15 +105,23 @@ # halt: Halt the system. # poweroff: Power down the system. # shell: Drop to a bash shell. -# Exiting the shell reboots the system. +# Exiting the shell reboots the system by default, +# or perform "final_action". # dump_to_rootfs: Dump vmcore to rootfs from initramfs context and -# reboot. Useful when non-root dump target is specified. +# reboot by default or perform "final_action". +# Useful when non-root dump target is specified. # The default option is "reboot". # # default <reboot | halt | poweroff | shell | dump_to_rootfs> # - Same as the "failure_action" directive above, but this directive # is obsolete and will be removed in the future. # +# final_action <reboot | halt | poweroff> +# - Action to perform in case dumping succeeds. Also performed +# when "shell" or "dump_to_rootfs" failure action finishes. +# Each action is same as the "failure_action" directive above. +# The default is "reboot". +# # force_rebuild <0 | 1> # - By default, kdump initrd will only be rebuilt when necessary. # Specify 1 to force rebuilding kdump initrd every time when kdump diff --git a/kdump.conf.5 b/kdump.conf.5 index c7098c9..5a0952b 100644 --- a/kdump.conf.5 +++ b/kdump.conf.5 @@ -155,9 +155,11 @@ reboot: Reboot the system (this is what most people will want, as it returns the to a normal state). halt: Halt the system and lose the vmcore. poweroff: The system will be powered down. shell: Drop to a shell session inside the initramfs, from which you can manually perform additional recovery actions. Exiting this shell reboots the -system. Note: kdump uses bash as the default shell. dump_to_rootfs: If non-root dump +system by default or performs "final_action". +Note: kdump uses bash as the default shell. dump_to_rootfs: If non-root dump target is specified, the failure action can be set as dump_to_rootfs. That means when -dumping to target fails, dump vmcore to rootfs from initramfs context and reboot. +dumping to target fails, dump vmcore to rootfs from initramfs context and reboot +by default or perform "final_action". .RE
.B default <reboot | halt | poweroff | shell | dump_to_rootfs> @@ -166,6 +168,14 @@ Same as the "failure_action" directive above, but this directive is obsolete and will be removed in the future. .RE
+.B final_action <reboot | halt | poweroff> +.RS +Action to perform in case dumping to the intended target succeeds. +Also performed when "shell" or "dump_to_rootfs" failure action finishes. +Each action is same as the "failure_action" directive above. +The default is "reboot". +.RE + .B force_rebuild <0 | 1> .RS By default, kdump initrd will only be rebuilt when necessary. diff --git a/kdumpctl b/kdumpctl index 25d9c28..de6da39 100755 --- a/kdumpctl +++ b/kdumpctl @@ -228,7 +228,7 @@ check_config() case "$config_opt" in #* | "") ;; - raw|ext2|ext3|ext4|minix|btrfs|xfs|nfs|ssh|sshkey|path|core_collector|kdump_post|kdump_pre|extra_bins|extra_modules|failure_action|default|force_rebuild|force_no_rebuild|dracut_args|fence_kdump_args|fence_kdump_nodes) + raw|ext2|ext3|ext4|minix|btrfs|xfs|nfs|ssh|sshkey|path|core_collector|kdump_post|kdump_pre|extra_bins|extra_modules|failure_action|default|final_action|force_rebuild|force_no_rebuild|dracut_args|fence_kdump_args|fence_kdump_nodes) # remove inline comments after the end of a directive. config_val=$(strip_comments $config_val) [ -z "$config_val" ] && { @@ -248,6 +248,7 @@ check_config() done < $KDUMP_CONFIG_FILE
check_failure_action_config || return 1 + check_final_action_config || return 1
check_fence_kdump_config || return 1
@@ -966,6 +967,25 @@ check_failure_action_config() esac }
+check_final_action_config() +{ + local final_action + + final_action=$(awk '$1 ~ /^final_action$/ {print $2;}' $KDUMP_CONFIG_FILE) + if [ -z "$final_action" ]; then + return 0 + else + case "$final_action" in + reboot|halt|poweroff) + return 0 + ;; + *) + echo $"Usage kdump.conf: final_action {reboot|halt|poweroff}" + return 1 + esac + fi +} + start() { check_dump_feasibility
Since early kdump is generally used for capturing vmcore when boot-time panic occurs, if a system always reboots after capturing vmcore, it can go into a crash loop.
To avoid this issue, this patch add a note of 'final_action' option to the early kdump document.
Signed-off-by: Kazuhito Hagio k-hagio@ab.jp.nec.com Cc: Dave Young dyoung@redhat.com Cc: Lianbo Jiang lijiang@redhat.com --- early-kdump-howto.txt | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/early-kdump-howto.txt b/early-kdump-howto.txt index fe4f13f..9af0ef1 100644 --- a/early-kdump-howto.txt +++ b/early-kdump-howto.txt @@ -1,6 +1,7 @@ Early Kdump HOWTO
Introduction +------------
Kdump service starts too late, so early crashes will have no chance to get kdump kernel booting, this will cause crash information to be lost. It is @@ -12,7 +13,8 @@ which is disabled by default. For the normal kdump service, it can check whether the early kdump has loaded the crash kernel and initramfs. It has no conflict with the early kdump.
-How to configure early kdump: +How to configure early kdump +----------------------------
We assume if you're reading this document, you should already have kexec-tools installed. @@ -21,6 +23,16 @@ You can rebuild the initramfs with earlykdump support with below steps: 1. start kdump service to make sure kdump initramfs is created. # systemctl start kdump
+ NOTE: If a crash occurs during boot process, early kdump captures a vmcore + and reboot the system by default, so the system might go into crash loop. + You can avoid such a crash loop by adding the following settings, which + power off the system after dump capturing, to kdump.conf in advance: + + final_action poweroff + failure_action poweroff + + For the failure_action, you can choose anything other than "reboot". + 2. rebuild system initramfs with earlykdump support. # dracut --add earlykdump
@@ -50,5 +62,6 @@ kdump kernel Mar 09 10:02:47 localhost.localdomain dracut-cmdline[189]: early-kdump is disabled.
Limitation +----------
At present, early kdump doesn't support fadump.
It looks good to me.
Thanks.
Lianbo
在 2019年01月18日 04:31, Kazuhito Hagio 写道:
If a crash occurs repeatedly after enabling kdump, the system goes into a crash loop and the dump target may get filled up by vmcores. This is likely especially with early kdump.
This patchset introduces 'final_action' option to kdump.conf, in order for users to be able to power off the system even after capturing a vmcore successfully.
In preparation for adding 'final_action' option, since it's confusing to have the 'final_action' and 'default' options at the same time, this patchset introduces 'failure_action' as an alias of the 'default' option to /etc/kdump.conf, and makes 'default' obsolete to be removed in the future. Also, the "default action" term is renamed to "failure action".
Changes from v1:
- Add a patch that introduces 'failure_action' option as an alias of 'default' option and make 'default' option obsolete.
- Improve some descriptions of 'final_action' behavior.
- Add a description that early kdump user can choose anything other than "reboot" as failure_action to avoid crash loop.
Kazuhito Hagio (3): Add failure_action as alias of default and make default obsolete Add final_action option to kdump.conf earlykdump: Add a note of final_action option to avoid crash loop
dracut-kdump-error-handler.service | 2 +- dracut-kdump-error-handler.sh | 2 +- early-kdump-howto.txt | 15 +++++++++- fadump-howto.txt | 15 +++++----- kdump-lib-initramfs.sh | 33 ++++++++++++++------- kdump-lib.sh | 6 ++-- kdump.conf | 24 ++++++++++++---- kdump.conf.5 | 24 +++++++++++++--- kdumpctl | 46 +++++++++++++++++++++++++----- kexec-kdump-howto.txt | 12 ++++---- 10 files changed, 133 insertions(+), 46 deletions(-)
Hi Kazu,
Thanks for the patchset.
On Fri, Jan 18, 2019 at 2:01 AM Kazuhito Hagio k-hagio@ab.jp.nec.com wrote:
If a crash occurs repeatedly after enabling kdump, the system goes into a crash loop and the dump target may get filled up by vmcores. This is likely especially with early kdump.
This patchset introduces 'final_action' option to kdump.conf, in order for users to be able to power off the system even after capturing a vmcore successfully.
In preparation for adding 'final_action' option, since it's confusing to have the 'final_action' and 'default' options at the same time, this patchset introduces 'failure_action' as an alias of the 'default' option to /etc/kdump.conf, and makes 'default' obsolete to be removed in the future. Also, the "default action" term is renamed to "failure action".
Changes from v1:
- Add a patch that introduces 'failure_action' option as an alias of 'default' option and make 'default' option obsolete.
- Improve some descriptions of 'final_action' behavior.
- Add a description that early kdump user can choose anything other than "reboot" as failure_action to avoid crash loop.
Kazuhito Hagio (3): Add failure_action as alias of default and make default obsolete Add final_action option to kdump.conf earlykdump: Add a note of final_action option to avoid crash loop
dracut-kdump-error-handler.service | 2 +- dracut-kdump-error-handler.sh | 2 +- early-kdump-howto.txt | 15 +++++++++- fadump-howto.txt | 15 +++++----- kdump-lib-initramfs.sh | 33 ++++++++++++++------- kdump-lib.sh | 6 ++-- kdump.conf | 24 ++++++++++++---- kdump.conf.5 | 24 +++++++++++++--- kdumpctl | 46 +++++++++++++++++++++++++----- kexec-kdump-howto.txt | 12 ++++---- 10 files changed, 133 insertions(+), 46 deletions(-)
-- 2.20.1
Acked-by: Bhupesh Sharma bhsharma@redhat.com
Thanks.
On 01/17/19 at 03:31pm, Kazuhito Hagio wrote:
If a crash occurs repeatedly after enabling kdump, the system goes into a crash loop and the dump target may get filled up by vmcores. This is likely especially with early kdump.
This patchset introduces 'final_action' option to kdump.conf, in order for users to be able to power off the system even after capturing a vmcore successfully.
In preparation for adding 'final_action' option, since it's confusing to have the 'final_action' and 'default' options at the same time, this patchset introduces 'failure_action' as an alias of the 'default' option to /etc/kdump.conf, and makes 'default' obsolete to be removed in the future. Also, the "default action" term is renamed to "failure action".
Changes from v1:
- Add a patch that introduces 'failure_action' option as an alias of 'default' option and make 'default' option obsolete.
- Improve some descriptions of 'final_action' behavior.
- Add a description that early kdump user can choose anything other than "reboot" as failure_action to avoid crash loop.
Kazuhito Hagio (3): Add failure_action as alias of default and make default obsolete Add final_action option to kdump.conf earlykdump: Add a note of final_action option to avoid crash loop
dracut-kdump-error-handler.service | 2 +- dracut-kdump-error-handler.sh | 2 +- early-kdump-howto.txt | 15 +++++++++- fadump-howto.txt | 15 +++++----- kdump-lib-initramfs.sh | 33 ++++++++++++++------- kdump-lib.sh | 6 ++-- kdump.conf | 24 ++++++++++++---- kdump.conf.5 | 24 +++++++++++++--- kdumpctl | 46 +++++++++++++++++++++++++----- kexec-kdump-howto.txt | 12 ++++---- 10 files changed, 133 insertions(+), 46 deletions(-)
-- 2.20.1
ACK
Thank you Kazu!
Thank you Lianbo, Bhupesh, Dave for your reviews!
Kazu
On 1/22/2019 4:53 AM, Dave Young wrote:
On 01/17/19 at 03:31pm, Kazuhito Hagio wrote:
If a crash occurs repeatedly after enabling kdump, the system goes into a crash loop and the dump target may get filled up by vmcores. This is likely especially with early kdump.
This patchset introduces 'final_action' option to kdump.conf, in order for users to be able to power off the system even after capturing a vmcore successfully.
In preparation for adding 'final_action' option, since it's confusing to have the 'final_action' and 'default' options at the same time, this patchset introduces 'failure_action' as an alias of the 'default' option to /etc/kdump.conf, and makes 'default' obsolete to be removed in the future. Also, the "default action" term is renamed to "failure action".
Changes from v1:
- Add a patch that introduces 'failure_action' option as an alias of 'default' option and make 'default' option obsolete.
- Improve some descriptions of 'final_action' behavior.
- Add a description that early kdump user can choose anything other than "reboot" as failure_action to avoid crash loop.
Kazuhito Hagio (3): Add failure_action as alias of default and make default obsolete Add final_action option to kdump.conf earlykdump: Add a note of final_action option to avoid crash loop
dracut-kdump-error-handler.service | 2 +- dracut-kdump-error-handler.sh | 2 +- early-kdump-howto.txt | 15 +++++++++- fadump-howto.txt | 15 +++++----- kdump-lib-initramfs.sh | 33 ++++++++++++++------- kdump-lib.sh | 6 ++-- kdump.conf | 24 ++++++++++++---- kdump.conf.5 | 24 +++++++++++++--- kdumpctl | 46 +++++++++++++++++++++++++----- kexec-kdump-howto.txt | 12 ++++---- 10 files changed, 133 insertions(+), 46 deletions(-)
-- 2.20.1
ACK
Thank you Kazu! _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org
On Fri, Jan 18, 2019 at 4:32 AM Kazuhito Hagio k-hagio@ab.jp.nec.com wrote:
If a crash occurs repeatedly after enabling kdump, the system goes into a crash loop and the dump target may get filled up by vmcores. This is likely especially with early kdump.
This patchset introduces 'final_action' option to kdump.conf, in order for users to be able to power off the system even after capturing a vmcore successfully.
In preparation for adding 'final_action' option, since it's confusing to have the 'final_action' and 'default' options at the same time, this patchset introduces 'failure_action' as an alias of the 'default' option to /etc/kdump.conf, and makes 'default' obsolete to be removed in the future. Also, the "default action" term is renamed to "failure action".
Changes from v1:
- Add a patch that introduces 'failure_action' option as an alias of 'default' option and make 'default' option obsolete.
- Improve some descriptions of 'final_action' behavior.
- Add a description that early kdump user can choose anything other than "reboot" as failure_action to avoid crash loop.
Kazuhito Hagio (3): Add failure_action as alias of default and make default obsolete Add final_action option to kdump.conf earlykdump: Add a note of final_action option to avoid crash loop
dracut-kdump-error-handler.service | 2 +- dracut-kdump-error-handler.sh | 2 +- early-kdump-howto.txt | 15 +++++++++- fadump-howto.txt | 15 +++++----- kdump-lib-initramfs.sh | 33 ++++++++++++++------- kdump-lib.sh | 6 ++-- kdump.conf | 24 ++++++++++++---- kdump.conf.5 | 24 +++++++++++++--- kdumpctl | 46 +++++++++++++++++++++++++----- kexec-kdump-howto.txt | 12 ++++---- 10 files changed, 133 insertions(+), 46 deletions(-)
-- 2.20.1 _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org
Hi Kazu,
Thanks for your patch, I applied your patch locally and didn't observe any problem, merged.
On 1/22/2019 9:12 PM, Kairui Song wrote:
On Fri, Jan 18, 2019 at 4:32 AM Kazuhito Hagio k-hagio@ab.jp.nec.com wrote:
If a crash occurs repeatedly after enabling kdump, the system goes into a crash loop and the dump target may get filled up by vmcores. This is likely especially with early kdump.
This patchset introduces 'final_action' option to kdump.conf, in order for users to be able to power off the system even after capturing a vmcore successfully.
In preparation for adding 'final_action' option, since it's confusing to have the 'final_action' and 'default' options at the same time, this patchset introduces 'failure_action' as an alias of the 'default' option to /etc/kdump.conf, and makes 'default' obsolete to be removed in the future. Also, the "default action" term is renamed to "failure action".
Changes from v1:
- Add a patch that introduces 'failure_action' option as an alias of 'default' option and make 'default' option obsolete.
- Improve some descriptions of 'final_action' behavior.
- Add a description that early kdump user can choose anything other than "reboot" as failure_action to avoid crash loop.
Kazuhito Hagio (3): Add failure_action as alias of default and make default obsolete Add final_action option to kdump.conf earlykdump: Add a note of final_action option to avoid crash loop
dracut-kdump-error-handler.service | 2 +- dracut-kdump-error-handler.sh | 2 +- early-kdump-howto.txt | 15 +++++++++- fadump-howto.txt | 15 +++++----- kdump-lib-initramfs.sh | 33 ++++++++++++++------- kdump-lib.sh | 6 ++-- kdump.conf | 24 ++++++++++++---- kdump.conf.5 | 24 +++++++++++++--- kdumpctl | 46 +++++++++++++++++++++++++----- kexec-kdump-howto.txt | 12 ++++---- 10 files changed, 133 insertions(+), 46 deletions(-)
-- 2.20.1 _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org
Hi Kazu,
Thanks for your patch, I applied your patch locally and didn't observe any problem, merged.
Thank you Kairui for testing and merging this!
Kazu