Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1494921

Summary: NPE when get LLDP info from host interface via REST
Product: Red Hat Enterprise Virtualization Manager Reporter: Meni Yakove <myakove>
Component: vdsmAssignee: Dominik Holler <dholler>
Status: CLOSED ERRATA QA Contact: Michael Burman <mburman>
Severity: high Docs Contact:
Priority: high    
Version: 4.1.6CC: danken, edwardh, lsurette, mgoldboi, srevivo, trichard, ycui, ykaul
Target Milestone: ovirt-4.2.0Keywords: ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
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.
Story Points: ---
Clone Of:
: 1496677 (view as bug list) Environment:
Last Closed: 2018-05-15 17:51:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1458501, 1496677    
Attachments:
Description Flags
vds, supervdsm and engine logs none

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