Bug 1494921 - NPE when get LLDP info from host interface via REST
Summary: NPE when get LLDP info from host interface via REST
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: vdsm
Version: 4.1.6
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ovirt-4.2.0
: ---
Assignee: Dominik Holler
QA Contact: Michael Burman
URL:
Whiteboard:
Depends On:
Blocks: 1458501 1496677
TreeView+ depends on / blocked
 
Reported: 2017-09-24 06:58 UTC by Meni Yakove
Modified: 2019-05-16 13:08 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, VDSM expected the optional object identifier (OID) field in LLDP. If this was absent, parsing of LLDP failed. Now, VDSM no longer expects the OID field in LLDP. LLDP info from the host is presented via the REST API without an OID.
Clone Of:
: 1496677 (view as bug list)
Environment:
Last Closed: 2018-05-15 17:51:57 UTC
oVirt Team: Network
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
vds, supervdsm and engine logs (3.31 MB, application/zip)
2017-09-24 07:01 UTC, Meni Yakove
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:1489 0 None None None 2018-05-15 17:53:24 UTC
oVirt gerrit 82151 0 master MERGED net: Treat OID as optional 2020-07-15 10:03:19 UTC
oVirt gerrit 82310 0 ovirt-4.1 MERGED net: Treat OID as optional 2020-07-15 10:03:19 UTC

Description Meni Yakove 2017-09-24 06:58:25 UTC
Description of problem:
NPE when trying to get LLDP from host interface.


Version-Release number of selected component (if applicable):
ovirt-engine-4.1.7.1-0.1.el7.noarch
vdsm-4.19.32-1.el7ev.x86_64



Steps to Reproduce:
1./ovirt-engine/api/hosts/<host-id>/nics/<nic-id>/linklayerdiscoveryprotocolelements


Actual results:
<fault>
<detail>Unexpected exception</detail>
<reason>Operation Failed</reason>
</fault>

Expected results:
Get LLDP info

Additional info:
supervdsm error:
Traceback (most recent call last):
  File "/usr/share/vdsm/supervdsmServer", line 95, in wrapper
    res = func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/vdsm/network/api.py", line 293, in get_lldp_info
    return lldp_info.get_info(filter)
  File "/usr/lib/python2.7/site-packages/vdsm/network/lldp/info.py", line 31, in get_info
    return {device: _get_info(device) for device in filter['devices']}
  File "/usr/lib/python2.7/site-packages/vdsm/network/lldp/info.py", line 31, in <dictcomp>
    return {device: _get_info(device) for device in filter['devices']}
  File "/usr/lib/python2.7/site-packages/vdsm/network/lldp/info.py", line 39, in _get_info
    dev_info['tlvs'] = Lldp.get_tlvs(device)
  File "/usr/lib/python2.7/site-packages/vdsm/network/lldp/lldpad.py", line 42, in get_tlvs
    return lldptool.get_tlvs(iface)
  File "/usr/lib/python2.7/site-packages/vdsm/network/lldpad/lldptool.py", line 82, in get_tlvs
    return _parse_tlvs(stdout)
  File "/usr/lib/python2.7/site-packages/vdsm/network/lldpad/lldptool.py", line 94, in _parse_tlvs
    'properties': tlv.parse_properties(properties)}
  File "/usr/lib/python2.7/site-packages/vdsm/network/lldpad/lldptool.py", line 142, in parse_properties
    return self._property_parser.parse(self.name, properties_text)
  File "/usr/lib/python2.7/site-packages/vdsm/network/lldpad/lldptool.py", line 191, in parse
    properties['object identifier'] = property_lines[2].split(
IndexError: list index out of range


LLDP info from the host using lldptool:
Chassis ID TLV
	MAC: 58:0a:20:36:81:da
Port ID TLV
	Local: Eth100/1/25
Time to Live TLV
	120
Port Description TLV
	Ethernet100/1/25
System Name TLV
	rack03-sw04-lab4.tlv.tlv.redhat.com
System Description TLV
	Cisco Nexus Operating System (NX-OS) Software
TAC support: http://www.cisco.com/tac
Copyright (c) 2002-2014, Cisco Systems, Inc. All rights reserved.
System Capabilities TLV
	System capabilities:  Bridge
	Enabled capabilities: Bridge
Management Address TLV
	IPv4: 10.35.23.241
	Ifindex: 83886080
CEE DCBX TLV
	Control TLV:
	  SeqNo: 1, AckNo: 20
	Priority Flow Control TLV:
	  Enabled, Not Willing, No Error
	  PFC enabled priorities: 3
	  Number of TC's supported: 8
	Application TLV:
	  Enabled, Not Willing, No Error
	  Ethertype: 0x8906, Priority Map: 0x08
	Priority Groups TLV:
	  Enabled, Not Willing, No Error
	  PGID Priorities:  0:[0,1,2,4,5,6,7] 1:[3]
	  PGID Percentages: 0:50% 1:50% 2:0% 3:0% 4:0% 5:0% 6:0% 7:0%
	  Number of TC's supported: 2
Cisco 4-wire Power-via-MDI TLV
	4-Pair PoE supported
	Spare pair Detection/Classification not required
	PD Spare pair Desired State: Disabled
	PSE Spare pair Operational State: Disabled
Unidentified Org Specific TLV
	OUI: 0x000142, Subtype: 2, Info: 240024002400086e2400240024002400
Port VLAN ID TLV
	PVID: 443
End of LLDPDU TLV

Comment 1 Meni Yakove 2017-09-24 07:01:34 UTC
Created attachment 1330100 [details]
vds, supervdsm and engine logs

Comment 2 Edward Haas 2017-09-24 07:05:27 UTC
8.5.9.7 object identifier (OID) string length
The object identifier string length field shall contain the length, in octets, of the OID. A value of zero in this
field indicates that the OID field is not provided.

Seems like the OID field is optional.

Comment 5 Michael Burman 2017-10-23 07:21:23 UTC
Verified on - vdsm-4.20.3-209.git65452bc.el7.centos.x86_64 and 4.2.0-0.0.master.20171022103432.gitaf9d8b6.el7.centos

Comment 10 errata-xmlrpc 2018-05-15 17:51:57 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, 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/RHEA-2018:1489

Comment 11 Franta Kust 2019-05-16 13:08:06 UTC
BZ<2>Jira Resync


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