RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1962421 - [RHEL-9]"eth0: Failed to rename network interface 3 from 'eth0' to 'kdump-eth0': File exists"
Summary: [RHEL-9]"eth0: Failed to rename network interface 3 from 'eth0' to 'kdump-eth...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: kexec-tools
Version: 9.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: ---
Assignee: Coiby
QA Contact: Jie Li
URL:
Whiteboard:
Depends On:
Blocks: 1964822
TreeView+ depends on / blocked
 
Reported: 2021-05-20 02:38 UTC by Coiby
Modified: 2023-05-09 10:15 UTC (History)
12 users (show)

Fixed In Version: kexec-tools-2.0.25-7.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1964822 (view as bug list)
Environment:
Last Closed: 2023-05-09 08:14:36 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2023:2463 0 None None None 2023-05-09 08:14:54 UTC

Description Coiby 2021-05-20 02:38:39 UTC
Description of problem:

kdump created a udev rule to rename the NIC by MAC address if the NIC name matches eno*. On Azure, the master and slave NIC have the same MAC address and name. After renaming the master NIC to kdump-eth0, udev would try to rename the slave NIC to kdump-eth0 and the following errors should show,

May 17 22:37:08 localhost.localdomain systemd-udevd[284]: eth0: Failed to rename network interface 3 from 'eth0' to 'kdump-eth0': File exists
May 17 22:37:08 localhost.localdomain systemd-udevd[284]: eth0: Failed to process device, ignoring: File exists

Version-Release number of selected component (if applicable):


How reproducible:

always

Steps to Reproduce:

Check the steps on https://bugzilla.redhat.com/show_bug.cgi?id=1950932.

Actual results:


Expected results:


Additional info:

Comment 1 Coiby 2021-05-27 10:25:20 UTC
Hi Dexuan,

To make the scary but harmless message message disappear, I need some input from you. It seems an exception needs to be made for the hv_netvsc NIC, i.e., don't add "kdump-" prefix to a hv_netvsc NIC with name matching eth*. But for the case of multiple hv_netvsc NIC on a system as shown in https://bugzilla.redhat.com/show_bug.cgi?id=1720157, I'm not sure about the correct fix. Say we have two hv_netvsc NICs, one has MAC address A and the other has MAC address B. In the first kernel, A has the name eth0 (the slave NIC has name eth1) and B has the name eth2 (the slave NIC has name eth3). Is it possible that A gets renamed to eth2 and B gets renambed to eth0 in the 2rd kernel?

Comment 2 Dexuan Cui 2021-05-31 19:48:06 UTC
Hi Coiby, I'm not really familiar with how the NICs are managed and configured by NetworkManager or other programs. IMO, from the kernel/driver's perspective, renaming the NICs itself is not an issue; we just need to make sure NetworkManager or other programs don't try to configure an IP to a VF-based network interface, i.e. the netvsc network interfaces have the IPs, and the VF network interfaces should never have IPs.

According to my experience, the interface names of the netvsc NICs are alwaye ethX, but the interface names of the VF NICs can be ethX (e.g. in RHEL 7.x?) or enPXXXXXX (e.g. in RHEL 8.x?), depending on the distro name/version. I don't know how exactly the interface names of VF NICs on Azure/Hyper-V are determinded in different distro names/versions.

If we only consider the interface names of the netvsc NICs, there can race conditions in both the first kernel and the second kernel that make the naming inconsistent, e.g. given a VM with 4 netvsc NICs (A/B/C/D), their interface names can be eth0/eth1/eth2/eth3, but the names can change to eth0/eth2/eth1/eth3 after the reboots. I described one of the race condtions here: https://bugzilla.redhat.com/show_bug.cgi?id=1906870#c29

> Is it possible that A gets renamed to eth2 and B gets renambed to eth0 in the 2rd kernel?
IMO this is possible, though it may be difficult to reproduce this in practice.

Comment 3 Coiby 2021-06-06 22:32:56 UTC
(In reply to Dexuan Cui from comment #2)

> Hi Coiby, I'm not really familiar with how the NICs are managed and
> configured by NetworkManager or other programs. IMO, from the
> kernel/driver's perspective, renaming the NICs itself is not an issue; we
> just need to make sure NetworkManager or other programs don't try to
> configure an IP to a VF-based network interface, i.e. the netvsc network
> interfaces have the IPs, and the VF network interfaces should never have IPs.
> 
> According to my experience, the interface names of the netvsc NICs are
> alwaye ethX, but the interface names of the VF NICs can be ethX (e.g. in
> RHEL 7.x?) or enPXXXXXX (e.g. in RHEL 8.x?), depending on the distro
> name/version. I don't know how exactly the interface names of VF NICs on
> Azure/Hyper-V are determinded in different distro names/versions.
> 
> If we only consider the interface names of the netvsc NICs, there can race
> conditions in both the first kernel and the second kernel that make the
> naming inconsistent, e.g. given a VM with 4 netvsc NICs (A/B/C/D), their
> interface names can be eth0/eth1/eth2/eth3, but the names can change to
> eth0/eth2/eth1/eth3 after the reboots. I described one of the race condtions
> here: https://bugzilla.redhat.com/show_bug.cgi?id=1906870#c29

Thanks for the explanation! This race condition is exactly the reason why kexec-tools adds "kdump-" prefix to the NIC name. Because kexec-tools needs to know which NIC is used from transferring vmcore to a remote FS. So adding "kdump-" prefix would help us tell which NIC is exactly needed by kexec-tools. I will figure out a solution that fixes https://bugzilla.redhat.com/show_bug.cgi?id=1958587 which could fix this bug as well.

> 
> > Is it possible that A gets renamed to eth2 and B gets renambed to eth0 in the 2rd kernel?
> IMO this is possible, though it may be difficult to reproduce this in
> practice.


THanks for confirming it!

Comment 13 xxiong 2022-12-07 14:13:12 UTC
The kexec-tools version on RHEL9.2 

[azureuser@controller-vm ~]$ rpm -qa kexec-tools
kexec-tools-2.0.25-7.el9.x86_64

Comment 19 errata-xmlrpc 2023-05-09 08:14:36 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (kexec-tools bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:2463


Note You need to log in before you can comment on or make changes to this bug.