Import from AlmaLinux stable repository

This commit is contained in:
eabdullin 2025-12-04 11:42:30 +00:00
parent 3be5bc4ff1
commit ec2f05524e
18 changed files with 107 additions and 31 deletions

1
.gitignore vendored
View File

@ -1,4 +1,3 @@
SOURCES/eppic-e8844d3.tar.gz
SOURCES/kexec-tools-2.0.29.tar.xz
SOURCES/makedumpfile-1.7.6.tar.gz
SOURCES/makedumpfile-1.7.7.tar.gz

View File

@ -1,4 +1,3 @@
80ac3f5e77d3c79883edadf14428734db4720009 SOURCES/eppic-e8844d3.tar.gz
b05e53b8f63ca039a06b0f8cb8a175b0f447449e SOURCES/kexec-tools-2.0.29.tar.xz
0182de2145780593639b4e0b4a573af0595b8988 SOURCES/makedumpfile-1.7.6.tar.gz
6484d9a1db114d8af56958987106d569976bc8d0 SOURCES/makedumpfile-1.7.7.tar.gz

View File

@ -1,4 +1,5 @@
dracutmodules=''
add_dracutmodules=' kdumpbase '
omit_dracutmodules='rdma plymouth resume ifcfg earlykdump '
omit_dracutmodules+=' clevis clevis-pin-null clevis-pin-tang clevis-pin-sss clevis-pin-tpm2 '
omit_drivers+=' nouveau amdgpu '

View File

@ -17,7 +17,7 @@ Latest kexec-tools provides "kdumpctl get-default-crashkernel" to retrieve
the default crashkernel value,
$ echo $(kdumpctl get-default-crashkernel)
1G-4G:192M,4G-64G:256M,64G-:512M
1G-2G:192M,2G-64G:256M,64G-:512M
It will be taken as the default value of 'crashkernel=', you can use
this value as a reference for setting crashkernel value manually.

View File

@ -349,11 +349,6 @@ kdump_install_nmconnections() {
exit 1
fi
done <<< "$(nmcli -t -f device,filename connection show --active)"
# Stop dracut 35network-manger to calling nm-initrd-generator.
# Note this line of code can be removed after NetworkManager >= 1.35.2
# gets released.
echo > "${initdir}/usr/libexec/nm-initrd-generator"
}
kdump_install_nm_netif_allowlist() {
@ -380,7 +375,27 @@ EOF
}
_get_nic_driver() {
ethtool -i "$1" | sed -n -E "s/driver: (.*)/\1/p"
local _driver
_driver=$(ethtool -i "$1" | sed -n -E "s/driver: (.*)/\1/p")
if [[ $_driver == "802.1Q VLAN Support" ]]; then
# ethtool somehow doesn't return the driver name for a VLAN NIC
_driver=8021q
fi
if ! modinfo "$_driver" &> /dev/null; then
# Fallback to get NIC driver by /sys/class/net/NIC/device/driver/module
# as some drivers like dwmac_tegra may report its name incorrectly.
# Note this method only for physical NICs i.e it doesn't work for
# virtual NICs like bonding NIC
_driver=$(basename "$(readlink -f /sys/class/net/"$1"/device/driver/module)")
if ! modinfo "$_driver" &> /dev/null; then
derror "Failed to find the driver for $1 ($_driver doesnt exist)"
fi
fi
echo -n "$_driver"
}
_get_hpyerv_physical_driver() {
@ -412,10 +427,7 @@ kdump_install_nic_driver() {
exit 1
fi
if [[ $_driver == "802.1Q VLAN Support" ]]; then
# ethtool somehow doesn't return the driver name for a VLAN NIC
_driver=8021q
elif [[ $_driver == "team" ]]; then
if [[ $_driver == "team" ]]; then
# install the team mode drivers like team_mode_roundrobin.ko as well
_driver='=drivers/net/team'
elif [[ $_driver == "hv_netvsc" ]]; then
@ -690,7 +702,7 @@ kdump_install_net() {
kdump_install_nmconnections
apply_nm_initrd_generator_timeouts
kdump_setup_znet
kdump_install_nm_netif_allowlist "$_netifs"
[[ $is_nvmf ]] || kdump_install_nm_netif_allowlist "$_netifs"
kdump_install_nic_driver "$_netifs"
kdump_install_resolv_conf
kdump_install_ovs_deps
@ -947,6 +959,33 @@ kdump_check_iscsi_targets() {
}
}
# Callback function for for_each_host_dev_and_slaves_all
#
# Code adapted from the is_nvmf function of dracut nvmf module
kdump_nvmf_callback() {
local _dev _d _trtype
_dev=$1
cd -P "/sys/dev/block/$_dev" || return 1
if [ -f partition ]; then
cd ..
fi
for _d in device/nvme*; do
[ -L "$_d" ] || continue
if readlink "$_d" | grep -q nvme-fabrics; then
read -r _trtype < "$_d"/transport
[[ $_trtype == "fc" || $_trtype == "tcp" || $_trtype == "rdma" ]] && return 0
fi
done
return 1
}
kdump_check_nvmf_target() {
for_each_host_dev_and_slaves_all kdump_nvmf_callback && is_nvmf=1
}
# hostname -a is deprecated, do it by ourself
get_alias() {
local ips
@ -1108,7 +1147,7 @@ remove_cpu_online_rule() {
install() {
declare -A unique_netifs ipv4_usage ipv6_usage
local arch has_ovs_bridge
local arch has_ovs_bridge is_nvmf
kdump_module_init
kdump_install_conf
@ -1163,6 +1202,8 @@ install() {
# at some point of time.
kdump_check_iscsi_targets
kdump_check_nvmf_target
kdump_install_systemd_conf
# nfs/ssh dump will need to get host ip in second kernel and need to call 'ip' tool, see get_host_ip for more detail

View File

@ -23,7 +23,8 @@ generate()
# - whether to reset kernel crashkernel to new default value
# or not when kexec-tools updates the default crashkernel value and
# existing kernels using the old default kernel crashkernel value.
# The default value is yes.
# The default value is yes. Note the user-specified value will be
# overwritten to the default crahskernel value.
#
# raw <partition>
# - Will dd /proc/vmcore into <partition>.

View File

@ -949,8 +949,11 @@ PROC_IOMEM=/proc/iomem
#get system memory size i.e. memblock.memory.total_size in the unit of GB
get_system_size()
{
sum=$(sed -n "s/\s*\([0-9a-fA-F]\+\)-\([0-9a-fA-F]\+\) : System RAM$/+ 0x\2 - 0x\1 + 1/p" $PROC_IOMEM)
echo $(( (sum) / 1024 / 1024 / 1024))
local _mem_size_mb _sum
_sum=$(sed -n "s/\s*\([0-9a-fA-F]\+\)-\([0-9a-fA-F]\+\) : System RAM$/+ 0x\2 - 0x\1 + 1/p" $PROC_IOMEM)
_mem_size_mb=$(( (_sum) / 1024 / 1024 ))
# rounding up the total_size to 128M to align with kernel code kernel/crash_reserve.c
echo $(((_mem_size_mb + 127) / 128 * 128 / 1024 ))
}
# Return the recommended size for the reserved crashkernel memory
@ -1153,7 +1156,7 @@ kdump_get_arch_recommend_crashkernel()
_arch=$(uname -m)
if [[ $_arch == "x86_64" ]] || [[ $_arch == "s390x" ]]; then
_ck_cmdline="1G-4G:192M,4G-64G:256M,64G-:512M"
_ck_cmdline="1G-2G:192M,2G-64G:256M,64G-:512M"
is_sme_or_sev_active && ((_delta += 64))
elif [[ $_arch == "aarch64" ]]; then
local _running_kernel

View File

@ -43,6 +43,7 @@ reset-crashkernel [--kernel=path_to_kernel]" if you want to use the default
value set after having enabled features like SME/SEV for a specific kernel. And
you should also reboot the system for the new crashkernel value to take effect.
Also see kdumpctl(8).
.RE
.B raw <partition>
.RS

View File

@ -21,7 +21,7 @@ KDUMP_COMMANDLINE_REMOVE="hugepages hugepagesz slub_debug quiet log_buf_len swio
# This variable lets us append arguments to the current kdump commandline
# after processed by KDUMP_COMMANDLINE_REMOVE
KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices novmcoredd cma=0 hugetlb_cma=0"
KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices novmcoredd cma=0 hugetlb_cma=0 kfence.sample_interval=0"
# Any additional kexec arguments required. In most situations, this should
# be left empty

View File

@ -21,7 +21,7 @@ KDUMP_COMMANDLINE_REMOVE="hugepages hugepagesz slub_debug quiet log_buf_len swio
# This variable lets us append arguments to the current kdump commandline
# after processed by KDUMP_COMMANDLINE_REMOVE
KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices cgroup_disable=memory udev.children-max=2 panic=10 swiotlb=noforce novmcoredd cma=0 hugetlb_cma=0"
KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices cgroup_disable=memory udev.children-max=2 panic=10 swiotlb=noforce novmcoredd cma=0 hugetlb_cma=0 kfence.sample_interval=0"
# Any additional kexec arguments required. In most situations, this should
# be left empty

View File

@ -21,7 +21,7 @@ KDUMP_COMMANDLINE_REMOVE="hugepages hugepagesz slub_debug quiet log_buf_len swio
# This variable lets us append arguments to the current kdump commandline
# after processed by KDUMP_COMMANDLINE_REMOVE
KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices numa=off udev.children-max=2 panic=10 transparent_hugepage=never novmcoredd cma=0 hugetlb_cma=0"
KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices numa=off udev.children-max=2 panic=10 transparent_hugepage=never novmcoredd cma=0 hugetlb_cma=0 kfence.sample_interval=0"
# Any additional kexec arguments required. In most situations, this should
# be left empty

View File

@ -21,7 +21,7 @@ KDUMP_COMMANDLINE_REMOVE="hugepages hugepagesz slub_debug quiet log_buf_len swio
# This variable lets us append arguments to the current kdump commandline
# after processed by KDUMP_COMMANDLINE_REMOVE
KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 noirqdistrib reset_devices cgroup_disable=memory numa=off udev.children-max=2 ehea.use_mcs=0 panic=10 kvm_cma_resv_ratio=0 transparent_hugepage=never novmcoredd hugetlb_cma=0"
KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 noirqdistrib reset_devices cgroup_disable=memory numa=off udev.children-max=2 ehea.use_mcs=0 panic=10 kvm_cma_resv_ratio=0 transparent_hugepage=never novmcoredd hugetlb_cma=0 kfence.sample_interval=0"
# Any additional kexec arguments required. In most situations, this should
# be left empty

View File

@ -21,11 +21,11 @@ KDUMP_COMMANDLINE_REMOVE="hugepages hugepagesz slub_debug quiet log_buf_len swio
# This variable lets us append arguments to the current kdump commandline
# after processed by KDUMP_COMMANDLINE_REMOVE
KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 noirqdistrib reset_devices cgroup_disable=memory numa=off udev.children-max=2 ehea.use_mcs=0 panic=10 kvm_cma_resv_ratio=0 transparent_hugepage=never novmcoredd hugetlb_cma=0"
KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 noirqdistrib reset_devices cgroup_disable=memory numa=off udev.children-max=2 ehea.use_mcs=0 panic=10 kvm_cma_resv_ratio=0 transparent_hugepage=never novmcoredd hugetlb_cma=0 kfence.sample_interval=0"
# This variable lets us append arguments to fadump (powerpc) capture kernel,
# further to the parameters passed via the bootloader.
FADUMP_COMMANDLINE_APPEND="nr_cpus=16 numa=off cgroup_disable=memory cma=0 kvm_cma_resv_ratio=0 hugetlb_cma=0 transparent_hugepage=never novmcoredd udev.children-max=2"
FADUMP_COMMANDLINE_APPEND="nr_cpus=16 numa=off cgroup_disable=memory cma=0 kvm_cma_resv_ratio=0 hugetlb_cma=0 transparent_hugepage=never novmcoredd udev.children-max=2 kfence.sample_interval=0"
# Any additional kexec arguments required. In most situations, this should
# be left empty

View File

@ -21,7 +21,7 @@ KDUMP_COMMANDLINE_REMOVE="hugepages hugepagesz slub_debug quiet log_buf_len swio
# This variable lets us append arguments to the current kdump commandline
# after processed by KDUMP_COMMANDLINE_REMOVE
KDUMP_COMMANDLINE_APPEND="nr_cpus=1 cgroup_disable=memory numa=off udev.children-max=2 panic=10 transparent_hugepage=never novmcoredd vmcp_cma=0 cma=0 hugetlb_cma=0"
KDUMP_COMMANDLINE_APPEND="nr_cpus=1 cgroup_disable=memory numa=off udev.children-max=2 panic=10 transparent_hugepage=never novmcoredd vmcp_cma=0 cma=0 hugetlb_cma=0 kfence.sample_interval=0"
# Any additional /sbin/mkdumprd arguments required.
MKDUMPRD_ARGS=""

View File

@ -21,7 +21,7 @@ KDUMP_COMMANDLINE_REMOVE="hugepages hugepagesz slub_debug quiet log_buf_len swio
# This variable lets us append arguments to the current kdump commandline
# 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 acpi_no_memhotplug transparent_hugepage=never nokaslr hest_disable novmcoredd cma=0 hugetlb_cma=0 pcie_ports=compat"
KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices cgroup_disable=memory mce=off numa=off udev.children-max=2 panic=10 acpi_no_memhotplug transparent_hugepage=never nokaslr hest_disable novmcoredd cma=0 hugetlb_cma=0 pcie_ports=compat kfence.sample_interval=0"
# Any additional kexec arguments required. In most situations, this should
# be left empty

View File

@ -143,6 +143,18 @@ rebuild_kdump_initrd()
return 0
}
check_and_generate_vconsole_conf()
{
if [[ ! -e /etc/vconsole.conf ]]; then
dwarn "/etc/vconsole.conf does not exist, trying to set keymap to us to reduce the initramfs size."
if [[ -x "$(command -v localectl)" ]] ; then
if localectl list-keymaps | grep -q "^us$"; then
localectl set-keymap us 2>/dev/null
fi
fi
fi
}
rebuild_initrd()
{
local _ret
@ -152,6 +164,8 @@ rebuild_initrd()
return 1
fi
check_and_generate_vconsole_conf
if [[ $DEFAULT_DUMP_MODE == "fadump" ]]; then
rebuild_fadump_initrd
else

View File

@ -47,6 +47,8 @@ storage:
software FCoE (bnx2fc) (Extra configuration required,
please read "Note on FCoE" section below)
NVMe-FC (qla2xxx, lpfc)
NVMe/TCP configured by NVMe Boot Firmware Table (users may need to
increase the crashkernel value)
network:
Hardware using kernel modules: (igb, ixgbe, ice, i40e, e1000e, igc,

View File

@ -5,7 +5,7 @@
Name: kexec-tools
Version: 2.0.29
Release: 5%{?dist}.2
Release: 10%{?dist}
License: GPLv2
Summary: The kexec/kdump userspace component
@ -407,11 +407,26 @@ fi
%endif
%changelog
* Thu Jun 19 2025 Tao Liu <ltao@redhat.com> - 2.0.29-5.2
- Bump up version number
* Thu Aug 7 2025 Tao Liu <ltao@redhat.com> - 2.0.29-10
- sysconfig: disable kfence in kdump kernel
* Fri Jun 6 2025 Tao Liu <ltao@redhat.com> - 2.0.29-5.1
* Fri Aug 1 2025 Tao Liu <ltao@redhat.com> - 2.0.29-9
- Support dumping to NVMe/TCP configured using NVMe Boot Firmware Table
* Thu Jun 12 2025 Tao Liu <ltao@redhat.com> - 2.0.29-8
- kdumpctl: check and generate /etc/vconsole.conf
- kdump-lib.sh: Reserve crashkernel by default for systems with 1G-2G memory
* Fri Apr 18 2025 Tao Liu <ltao@redhat.com> - 2.0.29-7
- 99-kdump.conf: Omit clevis related dracut modules
- kdump-lib.sh: rounded up the total_mem to 128M in get_system_size
- kdump-lib.sh: Adjust default crashkernel reservation for x86_64 and s390x
- doc/kdump.conf: correctly align the options
* Fri Mar 7 2025 Tao Liu <ltao@redhat.com> - 2.0.29-6
- 99-kdump.conf: Omit rdma module
- Fallback to get NIC driver by /sys/class/net/NIC/device/driver/module
- Note user-specified crashkernel value will be overwritten by default value
* Fri Jan 17 2025 Tao Liu <ltao@redhat.com> - 2.0.29-5
- 99-kdump.conf: Omit nouveau and amdgpu module