diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index 59b38af..c32b381 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -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() { @@ -707,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 @@ -964,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 @@ -1125,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 @@ -1180,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 diff --git a/supported-kdump-targets.txt b/supported-kdump-targets.txt index f282adf..4ae0d59 100644 --- a/supported-kdump-targets.txt +++ b/supported-kdump-targets.txt @@ -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,