LLDP collection doesn't work if _any_ interface fails

Bug #1790939 reported by Maciej Naruszewicz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Python client for Ironic Inspector
Invalid
Undecided
Unassigned

Bug Description

Some of our servers have 4/6 interfaces connected to the switches and they fail to submit LLDP information during inspection (i.e. baremetal ports are created but without any data in local link connection field). After some lecture of the code I found a comment suggesting that an empty list returned from select means a timeout on all interfaces (https://github.com/openstack/ironic-python-agent/blob/d0092633498c6611f5419d5b832042d57d344c8f/ironic_python_agent/netutils.py#L175). However, select's documentation claims that "When the time-out is reached without a file descriptor becoming ready, three empty lists are returned."

Revision history for this message
Maciej Naruszewicz (maciek-naruszewicz) wrote :
Download full text (3.6 KiB)

Sep 05 19:07:26 localhost.localdomain ironic-python-agent[1792]: 2018-09-05 19:07:26.959 1792 DEBUG ironic_python_agent.netutils [-] Getting LLDP info for interfaces [('eth5', <socket._socketobject object at 0x7f59ca5ef050>), ('eth1', <socket._socketobject object at 0x7f59ca5ef0c0>), ('eth0', <socket._socketobject object at 0x7f59ca5ef130>), ('eth2', <socket._socketobject object at 0x7f59ca5ef1a0>), ('eth4', <socket._socketobject object at 0x7f59ca5ef210>), ('eth3', <socket._socketobject object at 0x7f59ca5ef280>)] _get_lldp_info /usr/share/ironic-python-agent/venv/lib/python2.7/site-packages/ironic_python_agent/netutils.py:160
Sep 05 19:07:26 localhost.localdomain ironic-python-agent[1792]: 2018-09-05 19:07:26.959 1792 INFO ironic_python_agent.netutils [-] Waiting on LLDP info for interfaces: [('eth5', <socket._socketobject object at 0x7f59ca5ef050>), ('eth1', <socket._socketobject object at 0x7f59ca5ef0c0>), ('eth0', <socket._socketobject object at 0x7f59ca5ef130>), ('eth2', <socket._socketobject object at 0x7f59ca5ef1a0>), ('eth4', <socket._socketobject object at 0x7f59ca5ef210>), ('eth3', <socket._socketobject object at 0x7f59ca5ef280>)], timeout: 30.0
Sep 05 19:07:41 localhost.localdomain ironic-python-agent[1792]: 2018-09-05 19:07:41.174 1792 INFO ironic_python_agent.netutils [-] Found LLDP info for interface: eth4
Sep 05 19:07:41 localhost.localdomain ironic-python-agent[1792]: 2018-09-05 19:07:41.174 1792 INFO ironic_python_agent.netutils [-] Waiting on LLDP info for interfaces: [('eth5', <socket._socketobject object at 0x7f59ca5ef050>), ('eth1', <socket._socketobject object at 0x7f59ca5ef0c0>), ('eth0', <socket._socketobject object at 0x7f59ca5ef130>), ('eth2', <socket._socketobject object at 0x7f59ca5ef1a0>), ('eth3', <socket._socketobject object at 0x7f59ca5ef280>)], timeout: 30.0
Sep 05 19:07:41 localhost.localdomain ironic-python-agent[1792]: 2018-09-05 19:07:41.221 1792 INFO ironic_python_agent.netutils [-] Found LLDP info for interface: eth1
Sep 05 19:07:41 localhost.localdomain ironic-python-agent[1792]: 2018-09-05 19:07:41.222 1792 INFO ironic_python_agent.netutils [-] Waiting on LLDP info for interfaces: [('eth5', <socket._socketobject object at 0x7f59ca5ef050>), ('eth0', <socket._socketobject object at 0x7f59ca5ef130>), ('eth2', <socket._socketobject object at 0x7f59ca5ef1a0>), ('eth3', <socket._socketobject object at 0x7f59ca5ef280>)], timeout: 30.0
Sep 05 19:07:42 localhost.localdomain ironic-python-agent[1792]: 2018-09-05 19:07:42.627 1792 INFO ironic_python_agent.netutils [-] Found LLDP info for interface: eth5
Sep 05 19:07:42 localhost.localdomain ironic-python-agent[1792]: 2018-09-05 19:07:42.627 1792 INFO ironic_python_agent.netutils [-] Waiting on LLDP info for interfaces: [('eth0', <socket._socketobject object at 0x7f59ca5ef130>), ('eth2', <socket._socketobject object at 0x7f59ca5ef1a0>), ('eth3', <socket._socketobject object at 0x7f59ca5ef280>)], timeout: 30.0
Sep 05 19:07:42 localhost.localdomain ironic-python-agent[1792]: 2018-09-05 19:07:42.681 1792 INFO ironic_python_agent.netutils [-] Found LLDP info for interface: eth3
Sep 05 19:07:42 localhost.localdomain ironic-python-agent[1792]: 2018-09-05 19:07:42.681 1...

Read more...

description: updated
Revision history for this message
Maciej Naruszewicz (maciek-naruszewicz) wrote :

I did some more investigation and it turned out the LLDP data gets to Ironic Inspector but it doesn't get propagated to baremetal ports. The issue is still somewhere but it looks like I misinterpreted IPA's code. Sorry for the noise!

Changed in python-ironic-inspector-client:
status: New → Invalid
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.