Page MenuHomeVyOS Platform

LLDP op-mode exception: IndexError: list index out of range
Closed, ResolvedPublic

Description

This is on a custom-built image with a patch on config.py T2409 so that may have an effect on it.

vyos@vyos# run show lldp neighbors 
Report Time:      2020-05-15 22:23:46
Image Version:    VyOS 1.3-rolling-202005121147
Release Train:    equuleus

Built by:         jernej.jakob@gmail.com
Built on:         Tue 12 May 2020 11:47 UTC
Build UUID:       043f8641-36cc-410a-8f62-afedd8db9ad2
Build Commit ID:  2cb6f390d7bdaa

Architecture:     x86_64
Boot via:         installed image
System type:       guest

Hardware vendor:  PC Engines
Hardware model:   apu2
Hardware S/N:     Unknown
Hardware UUID:    Unknown

Traceback (most recent call last):
  File "/usr/libexec/vyos/op_mode/lldp_op.py", line 153, in <module>
    tmp['neighbors'].append( extract_neighbor(neighbor) )
  File "/usr/libexec/vyos/op_mode/lldp_op.py", line 110, in extract_neighbor
    device['platform'] = chassis[0].getElementsByTagName('descr')[0].firstChild.data[:20].replace(',',' ')
IndexError: list index out of range

show lldp neighbors detail works:

vyos@vyos# run show lldp neighbors detail 
-------------------------------------------------------------------------------
LLDP neighbors:
-------------------------------------------------------------------------------
Interface:    eth2, via: LLDP, RID: 1, Time: 0 day, 00:12:15
  Chassis:     
    ChassisID:    mac 6c:50:4d:xx:xx:xx
    SysName:      switch51c8b8
    Capability:   Bridge, on
  Port:        
    PortID:       mac 6c:50:4d:xx:xx:xx
    TTL:          120
    PMD autoneg:  supported: yes, enabled: yes
      Adv:          10Base-T, HD: yes, FD: yes
      Adv:          100Base-TX, HD: yes, FD: yes
      Adv:          1000Base-T, HD: no, FD: yes
      MAU oper type: 1000BaseTFD - Four-pair Category 5 UTP, full duplex mode
  VLAN:         1, pvid: yes
  LLDP-MED:    
    Device Type:  Network Connectivity Device
    Capability:   Capabilities, yes
    Capability:   Policy, yes
    Capability:   Location, yes
    Capability:   MDI/PSE, yes
    Capability:   Inventory, yes
    LLDP-MED Network Policy for: Voice, Defined: yes
      Priority:     Voice
      PCP:          5
      DSCP Value:   46
-------------------------------------------------------------------------------
[edit]

but show lldp neighbors interface eth2 shows nothing (even though it does have a neighbor, see above):

vyos@vyos# run show lldp neighbors interface eth2 
Capability Codes: R - Router, B - Bridge, W - Wlan r - Repeater, S - Station
                  D - Docsis, T - Telephone, O - Other

Device ID                 Local     Proto  Cap   Platform             Port ID
---------                 -----     -----  ---   --------             -------

[edit]

Details

Difficulty level
Unknown (require assessment)
Version
self-built 202005121147
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

jjakob triaged this task as Normal priority.May 15 2020, 8:38 PM
jjakob created this task.
jjakob created this object in space S1 VyOS Public.
Viacheslav claimed this task.
erkin set Issue type to Bug (incorrect behavior).Aug 30 2021, 6:12 AM
erkin removed a subscriber: Active contributors.