From 47add93aea92d6330ace5cf6f1a0e3b9fc32aa55 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jul 26 2021 12:37:10 +0000 Subject: import kexec-tools-2.0.20-54.el8 --- diff --git a/SOURCES/dracut-module-setup.sh b/SOURCES/dracut-module-setup.sh index 0d18f78..dafdad6 100755 --- a/SOURCES/dracut-module-setup.sh +++ b/SOURCES/dracut-module-setup.sh @@ -403,6 +403,7 @@ find_online_znet_device() { NETWORK_DEVICES=$(find $CCWGROUPBUS_DEVICEDIR) for d in $NETWORK_DEVICES do + [ ! -f "$d/online" ] && continue read ONLINE < $d/online if [ $ONLINE -ne 1 ]; then continue diff --git a/SOURCES/kdump-migrate-action.sh b/SOURCES/kdump-migrate-action.sh new file mode 100755 index 0000000..c516639 --- /dev/null +++ b/SOURCES/kdump-migrate-action.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +systemctl is-active kdump +if [ $? -ne 0 ]; then + exit 0 +fi + +/usr/lib/kdump/kdump-restart.sh diff --git a/SOURCES/kdump-restart.sh b/SOURCES/kdump-restart.sh new file mode 100644 index 0000000..a9ecfc1 --- /dev/null +++ b/SOURCES/kdump-restart.sh @@ -0,0 +1,8 @@ +#!/bin/bash +export PATH="$PATH:/usr/bin:/usr/sbin" + +exec >>/var/log/kdump-migration.log 2>&1 + +echo "kdump: Partition Migration detected. Rebuilding initramfs image to reload." +/usr/bin/kdumpctl rebuild +/usr/bin/kdumpctl reload diff --git a/SOURCES/kdump.sysconfig.s390x b/SOURCES/kdump.sysconfig.s390x index 3f75b76..efa0394 100644 --- a/SOURCES/kdump.sysconfig.s390x +++ b/SOURCES/kdump.sysconfig.s390x @@ -17,7 +17,7 @@ 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 quiet log_buf_len swiotlb" +KDUMP_COMMANDLINE_REMOVE="hugepages hugepagesz slub_debug quiet log_buf_len swiotlb prot_virt" # This variable lets us append arguments to the current kdump commandline # after processed by KDUMP_COMMANDLINE_REMOVE diff --git a/SPECS/kexec-tools.spec b/SPECS/kexec-tools.spec index ba32b7b..5a93974 100644 --- a/SPECS/kexec-tools.spec +++ b/SPECS/kexec-tools.spec @@ -1,6 +1,6 @@ Name: kexec-tools Version: 2.0.20 -Release: 53%{?dist} +Release: 54%{?dist} License: GPLv2 Group: Applications/System Summary: The kexec/kdump userspace component @@ -36,6 +36,8 @@ Source30: kdump.sysconfig.aarch64 Source31: fadump-howto.txt Source32: 60-kdump.install Source33: kdump-logger.sh +Source34: kdump-migrate-action.sh +Source35: kdump-restart.sh ####################################### # These are sources for mkdumpramfs @@ -52,6 +54,9 @@ Source107: dracut-kdump-emergency.target Source108: dracut-early-kdump.sh Source109: dracut-early-kdump-module-setup.sh +%ifarch ppc64 ppc64le +Requires(post): servicelog +%endif Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units @@ -227,6 +232,8 @@ install -m 644 %{SOURCE13} $RPM_BUILD_ROOT%{_udevrulesdir}/98-kexec.rules %endif %ifarch ppc64 ppc64le install -m 644 %{SOURCE14} $RPM_BUILD_ROOT%{_udevrulesdir}/98-kexec.rules +install -m 755 %{SOURCE34} $RPM_BUILD_ROOT%{_prefix}/lib/kdump/kdump-migrate-action.sh +install -m 755 %{SOURCE35} $RPM_BUILD_ROOT%{_prefix}/lib/kdump/kdump-restart.sh %endif %ifnarch s390x install -m 755 %{SOURCE29} $RPM_BUILD_ROOT%{_udevrulesdir}/../kdump-udev-throttler @@ -279,6 +286,13 @@ mv $RPM_BUILD_ROOT/etc/kdump-adv-conf/kdump_dracut_modules/* $RPM_BUILD_ROOT/%{d %systemd_post kdump.service touch /etc/kdump.conf + +ARCH=`uname -m` +if [ "$ARCH" == "ppc64" ] || [ "$ARCH" == "ppc64le" ] +then + servicelog_notify --add --command=/usr/lib/kdump/kdump-migrate-action.sh --match='refcode="#MIGRATE" and serviceable=0' --type=EVENT --method=pairs_stdin +fi + # This portion of the script is temporary. Its only here # to fix up broken boxes that require special settings # in /etc/sysconfig/kdump. It will be removed when @@ -389,6 +403,11 @@ done %endif %changelog +* Fri Jul 23 2021 Pingfan Liu - 2.0.20-54 +- kdump/ppc64: rebuild initramfs image after migration +- Check the existence of /sys/bus/ccwgroup/devices/*/online beforehand +- kdump.sysconfig.s390: Remove "prot_virt" from kdump kernel cmdline + * Fri Jul 2 2021 Pingfan Liu - 2.0.20-53 - check for invalid physical address of /proc/kcore when making ELF dumpfile - check for invalid physical address of /proc/kcore when finding max_paddr