[PATCH v6 0/6] Improve kdump debugging messages
by Lianbo Jiang
Sometimes, debugging the kdump service failure becomes very challenging
because there is no complete debugging information, which requires
modification of the options or the scripts like kdumpctl, mkdumprd, etc
to collect the information for troubleshooting.
That means users have to wait for the next failure so that they can
capture the additional information, which could waste valuable time.
This patch series will improve kdump debugging messages and have a
chance to save them to journald or a file. It includes the following
patches:
[1] [PATCH 1/5] introduce the kdump logger from the dracut
[2] [PATCH 2/5] enable the logger for kdump
[3] [PATCH 3/5] kdump.sysconfig: add the kdump logger configurations
[4] [PATCH 4/5] kdumpctl: add the '-d' option to enable the kexec loading
debugging messages
[5] [PATCH 5/5] Improve debugging in the kdump kernel
[6] [PATCH 6/6] Doc: add a documentation for the usage of logger
In addition, this patch series won't cause performance degradation,
basically this effect can be ignored. I simply checked the result of
executing the loading command as follow:
[1] before
# time kdumpctl start
Detected change(s) in the following file(s):
/etc/kdump.conf
Rebuilding /boot/initramfs-4.18.0-232.el8.x86_64kdump.img
Tips: If early kdump is enabled, also require rebuilding the system initramfs to make the changes take effect for early kdump.
kexec: loaded kdump kernel
Starting kdump: [OK]
real 0m9.145s
user 0m20.733s
sys 0m1.765s
[2] after
# time kdumpctl start
kdump: Detected change(s) in the following file(s): /etc/kdump.conf
kdump: Rebuilding /boot/initramfs-4.18.0-232.el8.x86_64kdump.img
kdump: Tips: If early kdump is enabled, also require rebuilding the system initramfs to make the changes take effect for early kdump.
kdump: kexec: loaded kdump kernel
kdump: Starting kdump: [OK]
real 0m9.177s
user 0m20.784s
sys 0m1.901s
Changes since v5:
[1] Only added a documentation for the usage of logger, there's
no code change.
Note:
Currently, kexec-tools disable storing logs to journald in order
to save memory, please refer to the following changes:
+++ b/dracut-module-setup.sh
@@ -788,6 +788,8 @@ kdump_install_random_seed() {
}
...
kdump_install_systemd_conf() {
if ! is_fadump_capable && [ "$failure_action" != "shell" ]; then
mkdir -p ${initdir}/etc/systemd/journald.conf.d
echo "[Journal]" > ${initdir}/etc/systemd/journald.conf.d/kdump.conf
echo "Storage=none" >> ${initdir}/etc/systemd/journald.conf.d/kdump.conf
^^^^
If we want to use the journald in kdump kernel, we have to change it to
"Storage=auto" or "volatile".
Lianbo Jiang (6):
introduce the kdump logger from the dracut
enable the logger for kdump
kdump.sysconfig: add the kdump logger configurations
kdumpctl: add the '-d' option to enable the kexec loading debugging
messages
Improve debugging in the kdump kernel
Doc: add a documentation for the usage of logger
dracut-early-kdump-module-setup.sh | 3 +
dracut-early-kdump.sh | 24 +-
dracut-kdump.sh | 68 +++---
dracut-module-setup.sh | 4 +
kdump-lib-initramfs.sh | 67 ++++--
kdump-lib.sh | 23 +-
kdump-logger.sh | 344 +++++++++++++++++++++++++++++
kdump.sysconfig | 16 ++
kdump.sysconfig.aarch64 | 16 ++
kdump.sysconfig.i386 | 16 ++
kdump.sysconfig.ppc64 | 16 ++
kdump.sysconfig.ppc64le | 16 ++
kdump.sysconfig.s390x | 16 ++
kdump.sysconfig.x86_64 | 16 ++
kdumpctl | 241 +++++++++++---------
kexec-kdump-howto.txt | 35 +++
kexec-tools.spec | 2 +
mkdumprd | 12 +-
18 files changed, 766 insertions(+), 169 deletions(-)
create mode 100755 kdump-logger.sh
--
2.17.1
3 years, 5 months
[PATCH] Revert "Revert "s390x: enable the kexec file load by default""
by Lianbo Jiang
This reverts commit fa8aa52d947edf86332c1194f86d70b6e0677a5c.
For the s390x, the vmlinuz image has only single signature according
to the kernel.spec. The dual signature issue doesn't happens on s390x,
therefore, let's restore it in order to enable the file load on s390x
by default.
Signed-off-by: Lianbo Jiang <lijiang(a)redhat.com>
---
kdump.sysconfig.s390x | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kdump.sysconfig.s390x b/kdump.sysconfig.s390x
index 232d7d49a7cf..5e1cb5a7ad89 100644
--- a/kdump.sysconfig.s390x
+++ b/kdump.sysconfig.s390x
@@ -31,7 +31,7 @@ MKDUMPRD_ARGS=""
#
# Example:
# KEXEC_ARGS="--elf32-core-headers"
-KEXEC_ARGS=""
+KEXEC_ARGS="-s"
#Where to find the boot image
#KDUMP_BOOTDIR="/boot"
--
2.17.1
3 years, 5 months
[PATCH] kdump-lib.sh: detect secure boot on s390
by Pingfan Liu
On s390, if Secure-IPL is enabled, then "kexec -s -l" is required.
Otherwise kdump kernel can not be loaded.
Signed-off-by: Pingfan Liu <piliu(a)redhat.com>
---
kdump-lib.sh | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/kdump-lib.sh b/kdump-lib.sh
index e18c473..e24f74f 100755
--- a/kdump-lib.sh
+++ b/kdump-lib.sh
@@ -612,6 +612,7 @@ is_secure_boot_enforced()
return 0
fi
+ # Detect secure boot on x86 and arm64
secure_boot_file=$(find /sys/firmware/efi/efivars -name SecureBoot-* 2>/dev/null)
setup_mode_file=$(find /sys/firmware/efi/efivars -name SetupMode-* 2>/dev/null)
@@ -624,6 +625,12 @@ is_secure_boot_enforced()
fi
fi
+ # Detect secure boot on s390x
+ if [[ -e "/sys/firmware/ipl/has_secure" && "$(cat /sys/firmware/ipl/has_secure)" == "1" \
+ && -e "/sys/firmware/ipl/secure" && "$(cat /sys/firmware/ipl/secure)" == "1" ]]; then
+ return 0
+ fi
+
return 1
}
--
2.7.5
3 years, 6 months
[PATCH 0/5] Fix driver detection code and include watchdog-modules
by Kairui Song
Block driver detection now doesn't work for raw targets, this will fix
it. And watchdog driver detection is broken after we enabled the squash
module, this also fixed that problem.
Last two patches will include watchdog-modules by default, but dracut
haven't make a release containing this module yet, so the last two
patches may be merged later.
Kairui Song (5):
kdumpctl: split the driver detection from fs dection function
Remove a redundant nfs check
Fix the watchdog drivers detection code
kdump-lib.sh: Use a more generic helper to detect omitted dracut
module
Always include watchdog-modules
dracut-module-setup.sh | 1 +
kdump-lib.sh | 35 +++-----
kdumpctl | 191 ++++++++++++++++-------------------------
3 files changed, 90 insertions(+), 137 deletions(-)
--
2.28.0
3 years, 6 months
[PATCH 0/2] Fix for selftest
by Kairui Song
Fix a small issue with latest Fedora 34.
Kairui Song (2):
selftest: Always use the get_image_fmt helper
selftest: Fix qcow2 image format detect
tests/scripts/image-init-lib.sh | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
--
2.28.0
3 years, 6 months
[PATCH v5 0/5] Improve kdump debugging messages
by Lianbo Jiang
Sometimes, debugging the kdump service failure becomes very challenging
because there is no complete debugging information, which requires
modification of the options or the scripts like kdumpctl, mkdumprd, etc
to collect the information for troubleshooting.
That means users have to wait for the next failure so that they can
capture the additional information, which could waste valuable time.
This patch series will improve kdump debugging messages and have a
chance to save them to journald or a file. It includes the following
patches:
[1] [PATCH 1/5] introduce the kdump logger from the dracut
[2] [PATCH 2/5] enable the logger for kdump
[3] [PATCH 3/5] kdump.sysconfig: add the kdump logger configurations
[4] [PATCH 4/5] kdumpctl: add the '-d' option to enable the kexec loading
debugging messages
[5] [PATCH 5/5] Improve debugging in the kdump kernel
In addition, this patch series won't cause performance degradation,
basically this effect can be ignored. I simply checked the result of
executing the loading command as follow:
[1] before
# time kdumpctl start
Detected change(s) in the following file(s):
/etc/kdump.conf
Rebuilding /boot/initramfs-4.18.0-232.el8.x86_64kdump.img
Tips: If early kdump is enabled, also require rebuilding the system initramfs to make the changes take effect for early kdump.
kexec: loaded kdump kernel
Starting kdump: [OK]
real 0m9.145s
user 0m20.733s
sys 0m1.765s
[2] after
# time kdumpctl start
kdump: Detected change(s) in the following file(s): /etc/kdump.conf
kdump: Rebuilding /boot/initramfs-4.18.0-232.el8.x86_64kdump.img
kdump: Tips: If early kdump is enabled, also require rebuilding the system initramfs to make the changes take effect for early kdump.
kdump: kexec: loaded kdump kernel
kdump: Starting kdump: [OK]
real 0m9.177s
user 0m20.784s
sys 0m1.901s
Changes since v4:
[1] Improve and simplify the logger
[2] Add the [PATCH 5/5] Improve debugging in the kdump kernel
Note:
Currently, kexec-tools disable storing logs to journald in order
to save memory, please refer to the following changes:
+++ b/dracut-module-setup.sh
@@ -788,6 +788,8 @@ kdump_install_random_seed() {
}
...
kdump_install_systemd_conf() {
if ! is_fadump_capable && [ "$failure_action" != "shell" ]; then
mkdir -p ${initdir}/etc/systemd/journald.conf.d
echo "[Journal]" > ${initdir}/etc/systemd/journald.conf.d/kdump.conf
echo "Storage=none" >> ${initdir}/etc/systemd/journald.conf.d/kdump.conf
^^^^
If we want to use the journald in kdump kernel, we have to change it to
"Storage=auto" or "volatile".
Lianbo Jiang (5):
introduce the kdump logger from the dracut
enable the logger for kdump
kdump.sysconfig: add the kdump logger configurations
kdumpctl: add the '-d' option to enable the kexec loading debugging
messages
Improve debugging in the kdump kernel
dracut-early-kdump-module-setup.sh | 3 +
dracut-early-kdump.sh | 24 +-
dracut-kdump.sh | 68 +++---
dracut-module-setup.sh | 4 +
kdump-lib-initramfs.sh | 67 ++++--
kdump-lib.sh | 23 +-
kdump-logger.sh | 344 +++++++++++++++++++++++++++++
kdump.sysconfig | 16 ++
kdump.sysconfig.aarch64 | 16 ++
kdump.sysconfig.i386 | 16 ++
kdump.sysconfig.ppc64 | 16 ++
kdump.sysconfig.ppc64le | 16 ++
kdump.sysconfig.s390x | 16 ++
kdump.sysconfig.x86_64 | 16 ++
kdumpctl | 241 +++++++++++---------
kexec-tools.spec | 2 +
mkdumprd | 12 +-
17 files changed, 731 insertions(+), 169 deletions(-)
create mode 100755 kdump-logger.sh
--
2.17.1
3 years, 6 months
[PATCH v4 0/4] Improve kdump debugging messages for kdump service
by Lianbo Jiang
Sometimes, debugging the kdump service failure becomes very challenging
because there is no complete debugging information, which requires
modification of the options or the scripts like kdumpctl, mkdumprd, etc
to collect the information for troubleshooting.
That means users have to wait for the next failure so that they can
capture the additional information, which could waste valuable time.
This patch series will improve kdump debugging messages and have a
chance to save them to journald or a file. It includes the following
patches:
[1] [PATCH 1/4] introduce the kdump logger from the dracut
[2] [PATCH 2/4] enable the logger for kdump
[3] [PATCH 3/4] kdump.sysconfig: add the kdump logger configurations
[4] [PATCH 4/4] kdumpctl: add the '-d' option to enable the kexec loading
debugging messages
In addition, this patch series won't cause performance degradation,
basically this effect can be ignored. I simply checked the result of
executing the loading command as follow:
[1] before
# time kdumpctl start
Detected change(s) in the following file(s):
/etc/kdump.conf
Rebuilding /boot/initramfs-4.18.0-232.el8.x86_64kdump.img
Tips: If early kdump is enabled, also require rebuilding the system initramfs to make the changes take effect for early kdump.
kexec: loaded kdump kernel
Starting kdump: [OK]
real 0m9.145s
user 0m20.733s
sys 0m1.765s
[2] after
# time kdumpctl start
kdump: Detected change(s) in the following file(s): /etc/kdump.conf
kdump: Rebuilding /boot/initramfs-4.18.0-232.el8.x86_64kdump.img
kdump: Tips: If early kdump is enabled, also require rebuilding the system initramfs to make the changes take effect for early kdump.
kdump: kexec: loaded kdump kernel
kdump: Starting kdump: [OK]
real 0m9.177s
user 0m20.784s
sys 0m1.901s
Changes since v3:
[1] modify the kdump-lib.sh and kdumpctl and improve them.
Lianbo Jiang (4):
introduce the kdump logger from the dracut
enable the logger for kdump
kdump.sysconfig: add the kdump logger configurations
kdumpctl: add the '-d' option to enable the kexec loading debugging
messages
dracut-early-kdump-module-setup.sh | 3 +
dracut-early-kdump.sh | 24 +-
kdump-lib.sh | 23 +-
kdump-logger.sh | 380 +++++++++++++++++++++++++++++
kdump.sysconfig | 21 ++
kdump.sysconfig.aarch64 | 21 ++
kdump.sysconfig.i386 | 21 ++
kdump.sysconfig.ppc64 | 21 ++
kdump.sysconfig.ppc64le | 21 ++
kdump.sysconfig.s390x | 21 ++
kdump.sysconfig.x86_64 | 21 ++
kdumpctl | 241 ++++++++++--------
kexec-tools.spec | 2 +
mkdumprd | 12 +-
14 files changed, 707 insertions(+), 125 deletions(-)
create mode 100755 kdump-logger.sh
--
2.17.1
3 years, 6 months