在 2020年10月13日 05:00, Bhupesh Sharma 写道:
Hello Lianbo,
This v5 series looks good.
I have some minor comments / nit-picks (some of which I have posted as
review comments to individual patches).
On Mon, Oct 12, 2020 at 4:06 PM Lianbo Jiang <lijiang(a)redhat.com> wrote:
>
> 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
I have the following suggestions:
Thank you for the suggestions.
- I think we should also modify 'kexec-kdump-howto.txt' to
indicate
the availability / usage format for this feature.
Sounds good.
- Maybe we can explain in the log messages why we are replacing
'echo'
with 'dinfo / derror / dwarn'. Since these changes form a major part
of the overall changeset, one needs right now to spend some time to
realize why this was needed.
Yes, the purpose of introducing the logger is to output kdump messages
according to the log level and save the logs conveniently. This is described
in patch log, but I can add this part to kexec-kdump-howto.txt.
Also I have the following queries:
- If I need to also take 'memstrack' console logs while running the
kdump kernel, will those logs also get routed to the path
'KDUMP_LOG_PATH="/var/log"'?
The KDUMP_LOG_PATH is used in the first kernel.
- I have a minor query on PATCH 5/5.
Replied it in another email.
Thanks.
Lianbo
Regards,
Bhupesh