Mellanox hardware detection issues a warning because loopback device has no vendor

Bug #1738192 reported by Doug Szumski
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ironic-python-agent
Won't Fix
Low
Unassigned

Bug Description

The Mellanox hardware manager attempts to find Mellanox devices by iterating through the contents of /sys/class/net and checking the vendor field in /sys/class/net/$NIC/device/vendor. However, the vendor file may not exist for the loopback device. This can cause the following warning during Mellanox hardware detection:

Dec 14 19:34:32 localhost ironic-python-agent: 2017-12-14 19:34:32.453 2515 WARNING root [-] Can't find field vendor for device lo in device class net: IOError: [Errno 2] No such file or directory: '/sys/class/net/lo/device/vendor'

IPA ramdisk info:
-----------------

[devuser@localhost ~]$ cat /etc/centos-release
CentOS Linux release 7.4.1708 (Core)

[devuser@localhost ~]$ uname -a
Linux localhost.localdomain 3.10.0-693.11.1.el7.x86_64 #1 SMP Mon Dec 4 23:52:40 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

[devuser@localhost ~]$ stat /sys/class/net/lo/device/vendor
stat: cannot stat '/sys/class/net/lo/device/vendor': No such file or directory

Relevant code:
--------------

Hardware detection:

https://github.com/openstack/ironic-python-agent/blame/stable/pike/ironic_python_agent/hardware_managers/mlnx.py#L62

The above method then calls this:

https://github.com/openstack/ironic-python-agent/blame/master/ironic_python_agent/hardware.py#L56

Revision history for this message
Dmitry Tantsur (divius) wrote :

Is this bug only about the warning or is something actual broken? From the code I assume the former, so setting priority to low.

Changed in ironic-python-agent:
status: New → Triaged
summary: - Mellanox hardware detection fails because loopback device has no vendor
+ Mellanox hardware detection issues a warning because loopback device has
+ no vendor
Changed in ironic-python-agent:
importance: Undecided → Low
Revision history for this message
Doug Szumski (dszumski) wrote :

Thanks - it's only about the warning which could cause confusion. Nothing is broken.

Revision history for this message
Jay Faulkner (jason-oldos) wrote :

We'd happily merge a small patch to fix this kind of issue; but due to the nature of hardware detection in IPA we cannot track down and eliminate all warning/error cases across all varied hardwares. Sorry :(.

Changed in ironic-python-agent:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.