kdump.sysconfig: add KDUMP_COMMANDLINE_REMOVE
Use KDUMP_COMMANDLINE_REMOVE config instead of hardcode them in kdumpctl, which makes it possible system admins decide what params to remove such as "quiet" or other debug flags. This patch also adds backward compatibility even if an old config is used. It will behave the same as the old version. Signed-off-by: Dangyi Liu <dliu@redhat.com> Acked-by: Baoquan He <bhe@redhat.com> Acked-by: Dave Young <dyoung@redhat.com>
This commit is contained in:
parent
386c6411d2
commit
3ec336c06c
@ -14,8 +14,13 @@ KDUMP_KERNELVER=""
|
||||
# /proc/cmdline
|
||||
KDUMP_COMMANDLINE=""
|
||||
|
||||
# This variable lets us remove arguments from the current kdump commandline
|
||||
# as taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
|
||||
# NOTE: some arguments such as crashkernel will always be removed
|
||||
KDUMP_COMMANDLINE_REMOVE="hugepages hugepagesz slub_debug"
|
||||
|
||||
# This variable lets us append arguments to the current kdump commandline
|
||||
# As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
|
||||
# after processed by KDUMP_COMMANDLINE_REMOVE
|
||||
KDUMP_COMMANDLINE_APPEND="irqpoll maxcpus=1 reset_devices"
|
||||
|
||||
# Any additional kexec arguments required. In most situations, this should
|
||||
|
@ -14,8 +14,13 @@ KDUMP_KERNELVER=""
|
||||
# /proc/cmdline
|
||||
KDUMP_COMMANDLINE=""
|
||||
|
||||
# This variable lets us remove arguments from the current kdump commandline
|
||||
# as taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
|
||||
# NOTE: some arguments such as crashkernel will always be removed
|
||||
KDUMP_COMMANDLINE_REMOVE="hugepages hugepagesz slub_debug"
|
||||
|
||||
# This variable lets us append arguments to the current kdump commandline
|
||||
# As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
|
||||
# after processed by KDUMP_COMMANDLINE_REMOVE
|
||||
KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices numa=off udev.children-max=2 panic=10 rootflags=nofail transparent_hugepage=never"
|
||||
|
||||
# Any additional kexec arguments required. In most situations, this should
|
||||
|
@ -14,8 +14,13 @@ KDUMP_KERNELVER=""
|
||||
# /proc/cmdline
|
||||
KDUMP_COMMANDLINE=""
|
||||
|
||||
# This variable lets us remove arguments from the current kdump commandline
|
||||
# as taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
|
||||
# NOTE: some arguments such as crashkernel will always be removed
|
||||
KDUMP_COMMANDLINE_REMOVE="hugepages hugepagesz slub_debug"
|
||||
|
||||
# This variable lets us append arguments to the current kdump commandline
|
||||
# As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
|
||||
# after processed by KDUMP_COMMANDLINE_REMOVE
|
||||
KDUMP_COMMANDLINE_APPEND="irqpoll maxcpus=1 noirqdistrib reset_devices cgroup_disable=memory numa=off udev.children-max=2 ehea.use_mcs=0 panic=10 rootflags=nofail kvm_cma_resv_ratio=0 transparent_hugepage=never"
|
||||
|
||||
# Any additional kexec arguments required. In most situations, this should
|
||||
|
@ -14,8 +14,13 @@ KDUMP_KERNELVER=""
|
||||
# /proc/cmdline
|
||||
KDUMP_COMMANDLINE=""
|
||||
|
||||
# This variable lets us remove arguments from the current kdump commandline
|
||||
# as taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
|
||||
# NOTE: some arguments such as crashkernel will always be removed
|
||||
KDUMP_COMMANDLINE_REMOVE="hugepages hugepagesz slub_debug"
|
||||
|
||||
# This variable lets us append arguments to the current kdump commandline
|
||||
# As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
|
||||
# after processed by KDUMP_COMMANDLINE_REMOVE
|
||||
KDUMP_COMMANDLINE_APPEND="irqpoll maxcpus=1 noirqdistrib reset_devices cgroup_disable=memory numa=off udev.children-max=2 ehea.use_mcs=0 panic=10 rootflags=nofail kvm_cma_resv_ratio=0 transparent_hugepage=never"
|
||||
|
||||
# Any additional kexec arguments required. In most situations, this should
|
||||
|
@ -14,8 +14,13 @@ KDUMP_KERNELVER=""
|
||||
# /proc/cmdline
|
||||
KDUMP_COMMANDLINE=""
|
||||
|
||||
# This variable lets us remove arguments from the current kdump commandline
|
||||
# as taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
|
||||
# NOTE: some arguments such as crashkernel will always be removed
|
||||
KDUMP_COMMANDLINE_REMOVE="hugepages hugepagesz slub_debug"
|
||||
|
||||
# This variable lets us append arguments to the current kdump commandline
|
||||
# As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
|
||||
# after processed by KDUMP_COMMANDLINE_REMOVE
|
||||
KDUMP_COMMANDLINE_APPEND="nr_cpus=1 cgroup_disable=memory numa=off udev.children-max=2 panic=10 rootflags=nofail transparent_hugepage=never"
|
||||
|
||||
# Any additional /sbin/mkdumprd arguments required.
|
||||
|
@ -14,8 +14,13 @@ KDUMP_KERNELVER=""
|
||||
# /proc/cmdline
|
||||
KDUMP_COMMANDLINE=""
|
||||
|
||||
# This variable lets us remove arguments from the current kdump commandline
|
||||
# as taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
|
||||
# NOTE: some arguments such as crashkernel will always be removed
|
||||
KDUMP_COMMANDLINE_REMOVE="hugepages hugepagesz slub_debug"
|
||||
|
||||
# This variable lets us append arguments to the current kdump commandline
|
||||
# As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
|
||||
# after processed by KDUMP_COMMANDLINE_REMOVE
|
||||
KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices cgroup_disable=memory mce=off numa=off udev.children-max=2 panic=10 rootflags=nofail acpi_no_memhotplug transparent_hugepage=never"
|
||||
|
||||
# Any additional kexec arguments required. In most situations, this should
|
||||
|
9
kdumpctl
9
kdumpctl
@ -19,6 +19,9 @@ DEFAULT_DUMP_MODE="kdump"
|
||||
|
||||
standard_kexec_args="-p"
|
||||
|
||||
# Some default values in case /etc/sysconfig/kdump doesn't include
|
||||
KDUMP_COMMANDLINE_REMOVE="hugepages hugepagesz slub_debug"
|
||||
|
||||
if [ -f /etc/sysconfig/kdump ]; then
|
||||
. /etc/sysconfig/kdump
|
||||
fi
|
||||
@ -105,8 +108,10 @@ prepare_cmdline()
|
||||
else
|
||||
cmdline=${KDUMP_COMMANDLINE}
|
||||
fi
|
||||
cmdline=`remove_cmdline_param "$cmdline" crashkernel hugepages hugepagesz panic_on_warn slub_debug`
|
||||
|
||||
# These params should always be removed
|
||||
cmdline=`remove_cmdline_param "$cmdline" crashkernel panic_on_warn`
|
||||
# These params can be removed configurably
|
||||
cmdline=`remove_cmdline_param "$cmdline" ${KDUMP_COMMANDLINE_REMOVE}`
|
||||
|
||||
cmdline="${cmdline} ${KDUMP_COMMANDLINE_APPEND}"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user