Bug 1723391

Summary: [RFE] Allow to match network devices by PCI Address
Product: Red Hat Enterprise Linux 8 Reporter: Terry Bowling <tbowling>
Component: NetworkManagerAssignee: sushil kulkarni <sukulkar>
Status: CLOSED WONTFIX QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.3CC: atragler, bgalvani, desktop-qa-list, fgiudici, lrintel, pasik, rkhan, sukulkar, thaller, till
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1673321 Environment:
Last Closed: 2020-03-30 13:16:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1673321    
Bug Blocks: 1695634    

Description Terry Bowling 2019-06-24 12:20:36 UTC
Cloning to evaluate for inclusion in RHEL 7.

+++ This bug was initially created as a clone of Bug #1673321 +++

Description of problem:
Currently, NetworkManager only allows to specify devices by name or MAC address. Since the device name is not stable and the MAC address requires an inventory about which MAC addresses are used, it would be nice to be able to specify a network card by PCI address, i.e. 0000:00:1f.6.

Additional info:
This could be implemented by a match setting that already exists for interface-name but not yet for PCI ID.

--- Additional comment from Thomas Haller on 2019-02-07 11:38:10 UTC ---

do you know how to obtain the PCI address?

--- Additional comment from Thomas Haller on 2019-02-07 11:56:43 UTC ---

there is:

 - grep PCI_SLOT_NAME /sys/class/net/*/device/uevent

 - ethtool -i eth0
 
     - which uses ETHTOOL_GDRVINFO and "struct ethtool_drvinfo"

 - udevadm info -a -p /sys/class/net/eth0

 - sudo lshw -c network -businfo  

 - lspci -D 

 - udevadm info /sys/class/net/eth0 



Note in `man systemd.link` there is:

       Path=
           A whitespace-separated list of shell-style globs matching the persistent path, as exposed by the udev property "ID_PATH".


and 

  $ udevadm info /sys/class/net/eth0 | grep ID_PATH=



So, we probably want to implement this udev "path".

Comment 3 Terry Bowling 2019-06-24 12:22:27 UTC
Cloned for the justification of the network role's objective to provide a uniform configuration experience across multiple RHEL major releases.

Comment 4 Thomas Haller 2020-03-30 13:16:39 UTC
This is a new feature, which we would rather not do for RHEL-7 anymore at this point.

Closing, we have bug 1673321 for RHEL-8.

It anyway needs fixing on RHEL-8 first. If need be, we can re-evaluate whether backporting to RHEL-7 afterwards.