[PATCH] mkdumprd: allow spaces after 'path' config phrase when network dump
by Kazuhito Hagio
Without this patch, when there are two or more spaces after 'path'
configuration phrase with ssh or nfs setting, SAVE_PATH is set to
'/var/crash' in mkdumprd, and in most cases kdump service fails to
start.
ssh kdump(a)192.168.122.1
path /kdump
^^
This behavior would be too sensitive and different from the other
configurations. With this patch, mkdumprd allows such spaces.
Signed-off-by: Kazuhito Hagio <k-hagio(a)ab.jp.nec.com>
---
mkdumprd | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mkdumprd b/mkdumprd
index a6f7fe8..aa0abfd 100644
--- a/mkdumprd
+++ b/mkdumprd
@@ -13,7 +13,7 @@ export IN_KDUMP=1
conf_file="/etc/kdump.conf"
SSH_KEY_LOCATION="/root/.ssh/kdump_id_rsa"
-SAVE_PATH=$(grep ^path $conf_file| cut -d' ' -f2)
+SAVE_PATH=$(awk '/^path/ {print $2}' $conf_file)
[ -z "$SAVE_PATH" ] && SAVE_PATH=$DEFAULT_PATH
# strip the duplicated "/"
SAVE_PATH=$(echo $SAVE_PATH | tr -s /)
--
2.18.0
1 year, 4 months
[PATCH v2] Doc: Improve the kdump sysconfig document
by Lianbo Jiang
Currently, the kdump sysconfig document is missed, let's add it to
the kexec-kdump-howto.txt as a document in order to help users better
understand these options in the /etc/sysconfig/kdump.
Signed-off-by: Lianbo Jiang <lijiang(a)redhat.com>
---
kexec-kdump-howto.txt | 84 ++++++++++++++++++++++++++++++++++++++++---
1 file changed, 79 insertions(+), 5 deletions(-)
diff --git a/kexec-kdump-howto.txt b/kexec-kdump-howto.txt
index 447bc5447886..3a58d8a0ffe1 100644
--- a/kexec-kdump-howto.txt
+++ b/kexec-kdump-howto.txt
@@ -524,17 +524,91 @@ to send over the necessary ssh key file. Restart the kdump service via
Advanced Setups
===============
-Kdump boot directory
---------------------
+About the /etc/sysconfig/kdump
+------------------------------
+
+Currently, there are a few options in the /etc/sysconfig/kdump, which are
+usually used to control the behavior of kdump kernel. Basically, all of
+these options have default values, most time we do not need to change them,
+but sometimes, we may modify them in order to better control the behavior
+of kdump kernel such as debug, etc.
+
+-KDUMP_BOOTDIR
Usually kdump kernel is the same as 1st kernel. So kdump will try to find
kdump kernel under /boot according to /proc/cmdline. E.g we execute below
command and get an output:
cat /proc/cmdline
BOOT_IMAGE=/xxx/vmlinuz-3.yyy.zzz root=xxxx .....
-Then kdump kernel will be /boot/xxx/vmlinuz-3.yyy.zzz.
-However a variable KDUMP_BOOTDIR in /etc/sysconfig/kdump is provided to
-user if kdump kernel is put in a different directory.
+
+Then kdump kernel will be /boot/xxx/vmlinuz-3.yyy.zzz. However, this option
+is provided to user if kdump kernel is put in a different directory.
+
+-KDUMP_IMG
+
+This represents the image type used for kdump. The default value is "vmlinuz".
+
+-KDUMP_IMG_EXT
+
+This represents the images extension. Relocatable kernels don't have one.
+Currently, it is a null string by default.
+
+-KEXEC_ARGS
+
+Any additional kexec arguments required. For example:
+KEXEC_ARGS="--elf32-core-headers".
+
+In most situations, this should be left empty. But, sometimes we hope to get
+additional kexec loading debugging information, we can add the '-d' option
+for the debugging.
+
+-KDUMP_KERNELVER
+
+This is a kernel version string for the kdump kernel. If the version is not
+specified, the init script will try to find a kdump kernel with the same
+version number as the running kernel.
+
+-KDUMP_COMMANDLINE
+
+The value of 'KDUMP_COMMANDLINE' will be passed to kdump kernel as command
+line parameters, this will likely match the contents of the grub kernel line.
+
+In general, if a command line is not specified, which means that it is a null
+string such as KDUMP_COMMANDLINE="", the default will be taken automatically
+from the '/proc/cmdline'.
+
+-KDUMP_COMMANDLINE_REMOVE
+
+This option allows us to remove arguments from the current kdump command line.
+If we don't specify any parameters for the KDUMP_COMMANDLINE, it will inherit
+all values from the '/proc/cmdline', which is not expected. As you know, some
+default kernel parameters could affect kdump, furthermore, that could cause
+the failure of kdump kernel boot.
+
+In addition, the option is also helpful to debug the kdump kernel, we can use
+this option to change kdump kernel command line.
+
+For more kernel parameters, please refer to kernel document.
+
+-KDUMP_COMMANDLINE_APPEND
+
+This option allows us to append arguments to the current kdump command line
+after processed by the KDUMP_COMMANDLINE_REMOVE. For kdump kernel, some
+specific modules require to be disabled like the mce, cgroup, numa, hest_disable,
+etc. Those modules may waste memory or kdump kernel doesn't need them,
+furthermore, there may affect kdump kernel boot.
+
+Just like above option, it can be used to disable or enable some kernel
+modules so that we can exclude any errors for kdump kernel, this is very
+meaningful for debugging.
+
+-KDUMP_STDLOGLVL | KDUMP_SYSLOGLVL | KDUMP_KMSGLOGLVL
+
+These variables are used to control the kdump log level in the first kernel.
+In the second kernel, kdump will use the rd.kdumploglvl option to set the log
+level in the above KDUMP_COMMANDLINE_APPEND.
+
+Logging levels: no logging(0), error(1), warn(2), info(3), debug(4)
Kdump Post-Capture Executable
-----------------------------
--
2.17.1
2 years, 8 months
[PATCH] kdump/lib: introduce a script to return recommened mem size
by Pingfan Liu
There is requirement to decide the recommended memory size for the current
system.
Implementing a script to achieve it.
Signed-off-by: Pingfan Liu <piliu(a)redhat.com>
---
kdump-lib-memsz.sh | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
kexec-tools.spec | 2 ++
2 files changed, 68 insertions(+)
create mode 100644 kdump-lib-memsz.sh
diff --git a/kdump-lib-memsz.sh b/kdump-lib-memsz.sh
new file mode 100644
index 0000000..d524a9f
--- /dev/null
+++ b/kdump-lib-memsz.sh
@@ -0,0 +1,66 @@
+#!/bin/sh
+# kdump-api-memsz.sh
+# return recommended size based on current system RAM size
+
+#get system memory size in the unit of GB
+get_system_size()
+{
+ result=$( cat /proc/iomem | grep "System RAM" | awk -F ":" {' print $1 '} | tr [:lower:] [:upper:] | paste -sd+ )
+ result="+$result"
+ # replace '-' with '+0x' and '+' with '-0x'
+ sum=$( echo $result | sed -e 's/-/K0x/g' | sed -e 's/+/-0x/g' | sed -e 's/K/+/g' )
+ size=$(printf "%d\n" $(($sum)))
+ let size=$size/1024/1024/1024
+
+ echo $size
+}
+
+get_recommend_size()
+{
+ local mem_size=$1
+ local _ck_cmdline=$2
+
+ last_sz=""
+ last_unit=""
+
+ IFS=','
+ for i in $_ck_cmdline
+ do
+ end=$( echo $i | awk -F "-" {' print $2 '} | awk -F ":" {' print $1 '} )
+ recommend=$( echo $i | awk -F "-" {' print $2 '} | awk -F ":" {' print $2 '} )
+ size=${end: : -1}
+ unit=${end: -1}
+ if [ $unit == 'T' ]; then
+ let size=$size*1024
+ fi
+ if [ $mem_size -lt $size ]; then
+ echo $recommend
+ return
+ fi
+ done
+ unset IFS
+}
+
+. /lib/kdump/kdump-lib.sh
+
+arch=$( lscpu | grep Architecture | awk -F ":" {' print $2 '} | tr [:lower:] [:upper:] )
+
+if [ $arch == "X86_64" ] || [ $arch == "S390" ]; then
+ ck_cmdline="1G-4G:160M,4G-64G:192M,64G-1T:256M,1T-:512M"
+elif [ $arch == "ARM64" ]; then
+ ck_cmdline="2G-:448M"
+elif [ $arch == "PPC64LE" ]; then
+ if is_fadump_capable; then
+ ck_cmdline="4G-16G:768M,16G-64G:1G,64G-128G:2G,128G-1T:4G,1T-2T:6G,2T-4T:12G,4T-8T:20G,8T-16T:36G,16T-32T:64G,32T-64T:128G,64T-:180G"
+ else
+ ck_cmdline="2G-4G:384M,4G-16G:512M,16G-64G:1G,64G-128G:2G,128G-:4G"
+ fi
+fi
+
+ck_cmdline=$( echo $ck_cmdline | sed -e 's/-:/-102400T:/g' )
+
+sys_mem=$(get_system_size)
+
+result=$( get_recommend_size $sys_mem "$ck_cmdline" )
+
+echo $result
diff --git a/kexec-tools.spec b/kexec-tools.spec
index 623274c..7f982c6 100644
--- a/kexec-tools.spec
+++ b/kexec-tools.spec
@@ -38,6 +38,7 @@ Source28: kdump-udev-throttler
Source29: kdump.sysconfig.aarch64
Source30: 60-kdump.install
Source31: kdump-logger.sh
+Source32: kdump-lib-memsz.sh
#######################################
# These are sources for mkdumpramfs
@@ -192,6 +193,7 @@ install -m 644 %{SOURCE25} $RPM_BUILD_ROOT%{_mandir}/man8/kdumpctl.8
install -m 755 %{SOURCE20} $RPM_BUILD_ROOT%{_prefix}/lib/kdump/kdump-lib.sh
install -m 755 %{SOURCE23} $RPM_BUILD_ROOT%{_prefix}/lib/kdump/kdump-lib-initramfs.sh
install -m 755 %{SOURCE31} $RPM_BUILD_ROOT%{_prefix}/lib/kdump/kdump-logger.sh
+install -m 755 %{SOURCE32} $RPM_BUILD_ROOT%{_prefix}/lib/kdump/kdump-lib-memsz.sh
%ifnarch s390x
install -m 755 %{SOURCE28} $RPM_BUILD_ROOT%{_udevrulesdir}/../kdump-udev-throttler
%endif
--
2.7.5
2 years, 8 months
[PATCH] Save the final failure information to log file if saving vmcore failed
by Lianbo Jiang
Currently, if saving vmcore failed, the final failure information won't
be saved to the kexec-dmesg.log, because the action of saving the log
occurs before the final log is printed, it has no chance to save the
log(marked it with the '^^^' below) to the log file(kexec-dmesg.log).
For example:
[1] console log:
[ 3.589967] kdump[453]: saving vmcore-dmesg.txt to /sysroot//var/crash/127.0.0.1-2020-11-26-14:19:17/
[ 3.627261] kdump[458]: saving vmcore-dmesg.txt complete
[ 3.633923] kdump[460]: saving vmcore
[ 3.661020] kdump[465]: saving vmcore failed
^^^^^^^^^^^^^^^^^^^^
[2] kexec-dmesg.log:
Nov 26 14:19:17 kvm-06-guest25.hv2.lab.eng.bos.redhat.com kdump[453]: saving vmcore-dmesg.txt to /sysroot//var/crash/127.0.0.1-2020-11-26-14:19:17/
Nov 26 14:19:17 kvm-06-guest25.hv2.lab.eng.bos.redhat.com kdump[458]: saving vmcore-dmesg.txt complete
Nov 26 14:19:17 kvm-06-guest25.hv2.lab.eng.bos.redhat.com kdump[460]: saving vmcore
Let's improve it in order to avoid the loss of important information.
Signed-off-by: Lianbo Jiang <lijiang(a)redhat.com>
---
dracut-kdump.sh | 43 +++++++++++++++++++++++++++---------------
kdump-lib-initramfs.sh | 20 ++++++++++++--------
2 files changed, 40 insertions(+), 23 deletions(-)
diff --git a/dracut-kdump.sh b/dracut-kdump.sh
index c2627c296040..370d217cea52 100755
--- a/dracut-kdump.sh
+++ b/dracut-kdump.sh
@@ -105,10 +105,12 @@ dump_raw()
dump_ssh()
{
- local ret
+ local _ret=0
+ local _exitcode=0 _exitcode2=0
local _opt="-i $1 -o BatchMode=yes -o StrictHostKeyChecking=yes"
local _dir="$KDUMP_PATH/$HOST_IP-$DATEDIR"
local _host=$2
+ local _vmcore="vmcore"
dinfo "saving to $_host:$_dir"
@@ -122,25 +124,36 @@ dump_ssh()
if [ "${CORE_COLLECTOR%%[[:blank:]]*}" = "scp" ]; then
scp -q $_opt /proc/vmcore "$_host:$_dir/vmcore-incomplete"
- ret=$?
- save_log
- scp -q $_opt $KDUMP_LOG_FILE "$_host:$_dir/"
- if [ $ret -ne 0 ]; then
- return 1
- fi
- ssh $_opt $_host "mv $_dir/vmcore-incomplete $_dir/vmcore" || return 1
+ _exitcode=$?
else
$CORE_COLLECTOR /proc/vmcore | ssh $_opt $_host "dd bs=512 of=$_dir/vmcore-incomplete"
- ret=$?
- save_log
- scp -q $_opt $KDUMP_LOG_FILE "$_host:$_dir/"
- if [ $ret -ne 0 ]; then
- return 1
+ _exitcode=$?
+ _vmcore="vmcore.flat"
+ fi
+
+ if [ $_exitcode -eq 0 ]; then
+ ssh $_opt $_host "mv $_dir/vmcore-incomplete $_dir/$_vmcore"
+ _exitcode2=$?
+ if [ $_exitcode2 -ne 0 ]; then
+ derror "moving vmcore failed, _exitcode:$_exitcode2"
+ else
+ dinfo "saving vmcore complete"
fi
- ssh $_opt $_host "mv $_dir/vmcore-incomplete $_dir/vmcore.flat" || return 1
+ else
+ derror "saving vmcore failed, _exitcode:$_exitcode"
+ fi
+
+ save_log
+ scp -q $_opt $KDUMP_LOG_FILE "$_host:$_dir/"
+ _ret=$?
+ if [ $_ret -ne 0 ]; then
+ derror "saving log file failed, _exitcode:$_ret"
+ fi
+
+ if [ $_exitcode -ne 0 ] || [ $_exitcode2 -ne 0 ];then
+ return 1
fi
- dinfo "saving vmcore complete"
return 0
}
diff --git a/kdump-lib-initramfs.sh b/kdump-lib-initramfs.sh
index 791d141aa00a..e766f95c7d6a 100755
--- a/kdump-lib-initramfs.sh
+++ b/kdump-lib-initramfs.sh
@@ -115,7 +115,7 @@ save_log()
# dump_fs <mount point>
dump_fs()
{
- local ret
+ local _exitcode
local _mp=$1
local _dev=$(get_mount_info SOURCE target $_mp -f)
local _op=$(get_mount_info OPTIONS target $_mp -f)
@@ -159,16 +159,20 @@ dump_fs()
dinfo "saving vmcore"
$CORE_COLLECTOR /proc/vmcore $_dump_path/vmcore-incomplete
- ret=$?
+ _exitcode=$?
+ if [ $_exitcode -eq 0 ]; then
+ mv $_dump_path/vmcore-incomplete $_dump_path/vmcore
+ sync
+ dinfo "saving vmcore complete"
+ else
+ derror "saving vmcore failed, _exitcode:$_exitcode"
+ fi
+
save_log
mv $KDUMP_LOG_FILE $_dump_path/
- if [ $ret -ne 0 ]; then
- return 1
+ if [ $_exitcode -ne 0 ]; then
+ return 1
fi
- mv $_dump_path/vmcore-incomplete $_dump_path/vmcore
- sync
-
- dinfo "saving vmcore complete"
# improper kernel cmdline can cause the failure of echo, we can ignore this kind of failure
return 0
--
2.17.1
2 years, 9 months
[PATCH] Doc: Improve the kdump sysconfig document
by Lianbo Jiang
Currently, the kdump sysconfig document is missed, let's add it to
the kexec-kdump-howto.txt as a document in order to help users better
understand these options in the /etc/sysconfig/kdump.
Signed-off-by: Lianbo Jiang <lijiang(a)redhat.com>
---
kexec-kdump-howto.txt | 85 ++++++++++++++++++++++++++++++++++++++++---
1 file changed, 80 insertions(+), 5 deletions(-)
diff --git a/kexec-kdump-howto.txt b/kexec-kdump-howto.txt
index 447bc5447886..206bc1800486 100644
--- a/kexec-kdump-howto.txt
+++ b/kexec-kdump-howto.txt
@@ -524,17 +524,92 @@ to send over the necessary ssh key file. Restart the kdump service via
Advanced Setups
===============
-Kdump boot directory
---------------------
+About the /etc/sysconfig/kdump
+------------------------------
+
+Currently, there are a few options in the /etc/sysconfig/kdump, which are
+usually used to control the behavior of kdump kernel. Basically, all of
+these options have default values, most time we do not need to change them,
+but sometimes, we may modify them in order to better control the behavior
+of kdump kernel such as debug, etc.
+
+-KDUMP_BOOTDIR
Usually kdump kernel is the same as 1st kernel. So kdump will try to find
kdump kernel under /boot according to /proc/cmdline. E.g we execute below
command and get an output:
cat /proc/cmdline
BOOT_IMAGE=/xxx/vmlinuz-3.yyy.zzz root=xxxx .....
-Then kdump kernel will be /boot/xxx/vmlinuz-3.yyy.zzz.
-However a variable KDUMP_BOOTDIR in /etc/sysconfig/kdump is provided to
-user if kdump kernel is put in a different directory.
+
+Then kdump kernel will be /boot/xxx/vmlinuz-3.yyy.zzz. However, this option
+is provided to user if kdump kernel is put in a different directory.
+
+-KDUMP_IMG
+
+This represents the image type used for kdump. The default value is "vmlinuz"
+like KDUMP_IMG="vmlinuz". In general, do not change it.
+
+-KDUMP_IMG_EXT
+
+This represents the images extension. Relocatable kernels don't have one.
+Currently, it should be a null string, do not modify it.
+
+-KEXEC_ARGS
+
+Any additional kexec arguments required. For example:
+KEXEC_ARGS="--elf32-core-headers".
+
+In most situations, this should be left empty. But, sometimes we hope to get
+additional kexec loading debugging information, we can add the '-d' option
+for the debugging.
+
+-KDUMP_KERNELVER
+
+This is a kernel version string for the kdump kernel. If the version is not
+specified, the init script will try to find a kdump kernel with the same
+version number as the running kernel. Usually, do not need to modify it.
+
+-KDUMP_COMMANDLINE
+
+The value of 'KDUMP_COMMANDLINE' will be passed to kdump kernel as command
+line parameters, this will likely match the contents of the grub kernel line.
+
+In general, if a command line is not specified, which means that it is a null
+string such as KDUMP_COMMANDLINE="", the default will be taken automatically
+from the '/proc/cmdline'. Most time, no need to modify it.
+
+-KDUMP_COMMANDLINE_REMOVE
+
+This option allows us to remove arguments from the current kdump command line.
+If we don't specify any parameters for the KDUMP_COMMANDLINE, it will inherit
+all values from the '/proc/cmdline', which is not expected. As you know, some
+default kernel parameters could affect kdump, furthermore, that could cause
+the failure of kdump kernel boot.
+
+In addition, the option is also helpful when we want to make a debugging, we
+can use this option to reconfigure kdump kernel command line.
+
+For more kernel parameters, please refer to kernel document.
+
+-KDUMP_COMMANDLINE_APPEND
+
+This option allows us to append arguments to the current kdump command line
+after processed by the KDUMP_COMMANDLINE_REMOVE. For kdump kernel, some
+specific modules require to be disabled like the mce, cgroup, numa, hest_disable,
+etc. Those modules may waste memory or kdump kernel doesn't need them,
+furthermore, there may affect kdump kernel boot.
+
+Just like above option, it can be used to disable or enable some kernel
+modules so that we can exclude any errors for kdump kernel, this is very
+meaningful for debugging.
+
+-KDUMP_STDLOGLVL|KDUMP_SYSLOGLVLKDUMP_KMSGLOGLVL
+
+These variables are used to control the kdump log level in the first kernel.
+In the second kernel, kdump will use the rd.kdumploglvl option to set the log
+level in the above KDUMP_COMMANDLINE_APPEND.
+
+Logging levels: no logging(0), error(1),warn(2),info(3),debug(4)
Kdump Post-Capture Executable
-----------------------------
--
2.17.1
2 years, 9 months
[PATCH] kdumpctl: fix a variable expansion in check_fence_kdump_config()
by Pingfan Liu
Both $ipaddrs and $node can hold multiple strings, so use "" to brace them.
Signed-off-by: Pingfan Liu <piliu(a)redhat.com>
---
kdumpctl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kdumpctl b/kdumpctl
index 3f6a9be..2e7f842 100755
--- a/kdumpctl
+++ b/kdumpctl
@@ -944,7 +944,7 @@ check_fence_kdump_config()
return 1
fi
# node can be ipaddr
- echo $ipaddrs | grep $node > /dev/null
+ echo "$ipaddrs " | grep "$node " > /dev/null
if [ $? -eq 0 ]; then
derror "Option fence_kdump_nodes cannot contain $node"
return 1
--
2.7.5
2 years, 9 months
[PATCH] dracut-module-setup.sh: Use systemctl call to replace ln_r
by Kairui Song
systemctl -q --root "$initdir" add-wants X.target X.service is the
recommanded way to add service dependency, and it covers more corner
cases.
---
dracut-module-setup.sh | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh
index ec1ccc5..21f7105 100755
--- a/dracut-module-setup.sh
+++ b/dracut-module-setup.sh
@@ -849,8 +849,7 @@ install() {
inst "/lib/kdump/kdump-logger.sh" "/lib/kdump-logger.sh"
inst "$moddir/kdump.sh" "/usr/bin/kdump.sh"
inst "$moddir/kdump-capture.service" "$systemdsystemunitdir/kdump-capture.service"
- mkdir -p "$initdir/$systemdsystemunitdir/initrd.target.wants"
- ln_r "$systemdsystemunitdir/kdump-capture.service" "$systemdsystemunitdir/initrd.target.wants/kdump-capture.service"
+ systemctl -q --root "$initdir" add-wants initrd.target kdump-capture.service
inst "$moddir/kdump-error-handler.sh" "/usr/bin/kdump-error-handler.sh"
inst "$moddir/kdump-error-handler.service" "$systemdsystemunitdir/kdump-error-handler.service"
# Replace existing emergency service and emergency target
--
2.29.2
2 years, 9 months
[PATCH] Doc: improve mkdumprd man page
by Lianbo Jiang
Currently, when generating a kdump initramfs, mkdumprd will determine
how much disk space is available, if the dump target's available space
is not greater than the total system memory, mkdumprd will print a
warning to remind that there might not be enough space to save a vmcore.
Some users are complaining that mkdumprd overestimates the needed size.
But actually, the warning covers extreme scenarios such as the slab
explodes with non-zero data or a full vmcore, etc. Therefore, need to
prevent users from having minimum disk space for crash dump.
In view of this, add some descriptions to clarify it in mkdumprd man
page.
Signed-off-by: Lianbo Jiang <lijiang(a)redhat.com>
---
mkdumprd.8 | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/mkdumprd.8 b/mkdumprd.8
index 7faae57ef128..2ac3d5a32060 100644
--- a/mkdumprd.8
+++ b/mkdumprd.8
@@ -15,7 +15,13 @@ be loaded in the initramfs (based on configuration retrieved from
\fI/etc/kdump.conf)\fR
\fBmkdumprd\fR add a new \fBdracut\fR module 99kdumpbase and use \fBdracut\fR
-utility to generate the initramfs.
+utility to generate the initramfs. When generating a kdump initramfs, \fBmkdumprd\fR
+will determine how much disk space is available, if the dump target's available
+space is not greater than the total system memory, \fBmkdumprd\fR will print a
+warning to remind that there might not be enough space to save a vmcore. The
+warning covers extreme scenarios such as the slab explodes with non-zero data or
+a full vmcore, etc. Therefore, need to prevent users from having minimum disk
+space for crash dump.
\fBmkdumprd\fR was not intended for casual use outside of the service
initialization script for the kdump utility, and should not be run manually. If
--
2.17.1
2 years, 9 months
[PATCH] Don's try to restart dracut-initqueue if it's already failed
by Kairui Song
If dracut-initqueue failed in kdump kernel and failure action
is set to dump_to_rootfs, there is no point try again to start the
initqueue. It will also slow down the dump process, and the initqueue
will most like still now work if first attemp failed.
So just try to start sysroot.mount, if it failed, there is no luck.
Signed-off-by: Kairui Song <kasong(a)redhat.com>
---
kdump-lib-initramfs.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kdump-lib-initramfs.sh b/kdump-lib-initramfs.sh
index 9275c83..791d141 100755
--- a/kdump-lib-initramfs.sh
+++ b/kdump-lib-initramfs.sh
@@ -222,7 +222,8 @@ dump_to_rootfs()
{
dinfo "Trying to bring up rootfs device"
- systemctl start dracut-initqueue
+ systemctl is-failed dracut-initqueue || systemctl start dracut-initqueue
+
dinfo "Waiting for rootfs mount, will timeout after 90 seconds"
systemctl start sysroot.mount
--
2.28.0
2 years, 9 months
[PATCHv2] dracut-module-setup.sh: use auto6 for ipv6
by Pingfan Liu
The parameter either6 is introduced to dracut by
commit 67354eebbcd4c358b8194ba5fd1ab1cf7dbd42aa
Author: Pingfan Liu <piliu(a)redhat.com>
Date: Tue Apr 24 16:41:21 2018 +0800
40network: introduce ip=either6 option
But it turns out needless.
On a sensible ipv6 network environment, DHCPv6 can not work properly alone,
because DHCPv6 protocol has no info about the gateway.
An reasonalbe process of ipv6 address set up should look like
host send: Router Solicitation
router reply: Router Advertisements
"Router Advertisements" carries many info like gateway, and if it has
other-config flag set, it carries DNS info etc. As for DHCPv6 address
allocation, it will only start if "Router Advertisements" has the 'managed'
flag set, which directs the host to start a stateful address allocation
from DHCPv6 server.
For more info:
rfc4861: Neighbor Discovery for IP version 6 (IPv6)
rfc5175: IPv6 Router Advertisement Flags Option
Signed-off-by: Pingfan Liu <piliu(a)redhat.com>
---
dracut-module-setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh
index 5c41e63..ec1ccc5 100755
--- a/dracut-module-setup.sh
+++ b/dracut-module-setup.sh
@@ -373,7 +373,7 @@ kdump_install_net() {
if [ -n "$_static" ]; then
_proto=none
elif is_ipv6_address $_srcaddr; then
- _proto=either6
+ _proto=auto6
else
_proto=dhcp
fi
--
2.7.5
2 years, 9 months