This version of patch looks good to me.
Reviewed-by: Lichen Liu <lichliu(a)redhat.com>
On Fri, Dec 16, 2022 at 9:00 AM Coiby Xu <coxu(a)redhat.com> wrote:
Resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=2151500
Currently, kdump initrd fails to be built when dumping vmcore to
localhost via ssh or nfs,
kdumpctl[3331]: Cannot get driver information: Operation not supported
kdumpctl[1991]: dracut: Failed to get the driver of lo
dracut[2020]: Failed to get the driver of lo
kdumpctl[1775]: kdump: mkdumprd: failed to make kdump initrd
kdumpctl[1775]: kdump: Starting kdump: [FAILED]
systemd[1]: kdump.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: kdump.service: Failed with result 'exit-code'.
systemd[1]: Failed to start Crash recovery kernel arming.
systemd[1]: kdump.service: Consumed 1.710s CPU time.
This is because the loopback interface is used for transferring vmcore and
ethtool can't get the driver of the loopback interface. In fact, once
COFNIG_NET is enabled, the loopback device is enabled and there is no driver
for the loopback device. So skip installing driver for the loopback device.
The loopback interface is implemented in linux/drivers/net/loopback.c
and always has the name "lo". So we can safely tell if a network
interface is the loopback interface by its name.
Fixes: a65dde2d ("Reduce kdump memory consumption by only installing needed NIC
drivers")
Reported-by: Martin Pitt <mpitt(a)redhat.com>
Reported-by: Rich Megginson <rmeggins(a)redhat.com>
Signed-off-by: Coiby Xu <coxu(a)redhat.com>
---
v2
- distinguish the loopback interface simply by its name
---
dracut-module-setup.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh
index 13e99015..aac3d8e5 100755
--- a/dracut-module-setup.sh
+++ b/dracut-module-setup.sh
@@ -387,6 +387,7 @@ kdump_install_nic_driver() {
_drivers=()
for _netif in $1; do
+ [[ $_netif != lo ]] || continue
_driver=$(_get_nic_driver "$_netif")
if [[ -z $_driver ]]; then
derror "Failed to get the driver of $_netif"
@@ -404,6 +405,7 @@ kdump_install_nic_driver() {
_drivers+=("$_driver")
done
+ [[ -n ${_drivers[*]} ]] || return
instmods "${_drivers[@]}"
}
--
2.38.1
_______________________________________________
kexec mailing list -- kexec(a)lists.fedoraproject.org
To unsubscribe send an email to kexec-leave(a)lists.fedoraproject.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org
Do not reply to spam, report it:
https://pagure.io/fedora-infrastructure/new_issue