Skip to content

Commit 0678138

Browse files
committed
Support dumping to NVMe/TCP configured using NVMe Boot Firmware Table
Resolves: https://issues.redhat.com/browse/RHEL-100907 Resolves: https://issues.redhat.com/browse/RHEL-33413 The dracut nvmf module can take care of all things. It can parse ACPI NVMe Boot Firmware Table (NBFT) tables, generate NetworkManager profiles and discover and connect all subsystems. Currently, the dracut kdump module will try to bring up the same network connections as in 1st kernel. But a different set of NVMe connections and active network interfaces will be used for the case of multipathing. So the dracut kdump module should let dracut nvmf module do everything. Note connecting everything and having network redundancy may require extra memory and the default crashkernel may not work. We'll document this issue and ask users to increase the crashkernel. Signed-off-by: Coiby Xu <[email protected]>
1 parent 3f6c16e commit 0678138

File tree

2 files changed

+33
-6
lines changed

2 files changed

+33
-6
lines changed

dracut/99kdumpbase/module-setup.sh

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -360,11 +360,6 @@ kdump_install_nmconnections() {
360360
exit 1
361361
fi
362362
done <<< "$(nmcli -t -f device,filename connection show --active)"
363-
364-
# Stop dracut 35network-manger to calling nm-initrd-generator.
365-
# Note this line of code can be removed after NetworkManager >= 1.35.2
366-
# gets released.
367-
echo > "${initdir}/usr/libexec/nm-initrd-generator"
368363
}
369364

370365
kdump_install_nm_netif_allowlist() {
@@ -658,7 +653,7 @@ kdump_install_net() {
658653
kdump_install_nmconnections
659654
apply_nm_initrd_generator_timeouts
660655
kdump_setup_znet "$_netifs"
661-
kdump_install_nm_netif_allowlist "$_netifs"
656+
[[ $is_nvmf ]] || kdump_install_nm_netif_allowlist "$_netifs"
662657
kdump_install_nic_driver "$_netifs"
663658
kdump_install_resolv_conf
664659
fi
@@ -915,6 +910,33 @@ kdump_check_iscsi_targets() {
915910
}
916911
}
917912

913+
# Callback function for for_each_host_dev_and_slaves_all
914+
#
915+
# Code adapted from the is_nvmf function of dracut nvmf module
916+
kdump_nvmf_callback() {
917+
local _dev _d _trtype
918+
919+
_dev=$1
920+
921+
cd -P "/sys/dev/block/$_dev" || return 1
922+
if [ -f partition ]; then
923+
cd ..
924+
fi
925+
926+
for _d in device/nvme*; do
927+
[ -L "$_d" ] || continue
928+
if readlink "$_d" | grep -q nvme-fabrics; then
929+
read -r _trtype < "$_d"/transport
930+
[[ $_trtype == "fc" || $_trtype == "tcp" || $_trtype == "rdma" ]] && return 0
931+
fi
932+
done
933+
return 1
934+
}
935+
936+
kdump_check_nvmf_target() {
937+
for_each_host_dev_and_slaves_all kdump_nvmf_callback && is_nvmf=1
938+
}
939+
918940
# hostname -a is deprecated, do it by ourself
919941
get_alias() {
920942
local ips
@@ -1074,6 +1096,7 @@ EOF
10741096

10751097
install() {
10761098
declare -A unique_netifs ovs_unique_netifs ipv4_usage ipv6_usage
1099+
local is_nvmf
10771100

10781101
kdump_module_init
10791102
kdump_install_conf
@@ -1121,6 +1144,8 @@ install() {
11211144
# at some point of time.
11221145
kdump_check_iscsi_targets
11231146

1147+
kdump_check_nvmf_target
1148+
11241149
kdump_install_systemd_conf
11251150

11261151
# 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

supported-kdump-targets.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ storage:
4747
software FCoE (bnx2fc) (Extra configuration required,
4848
please read "Note on FCoE" section below)
4949
NVMe-FC (qla2xxx, lpfc)
50+
NVMe/TCP configured by NVMe Boot Firmware Table (users may need to
51+
increase the crashkernel value)
5052

5153
network:
5254
Hardware using kernel modules: (igb, ixgbe, ice, i40e, e1000e, igc,

0 commit comments

Comments
 (0)