Page MenuHomeVyOS Platform

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


This is on a custom-built image with a patch on 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:         [email protected]
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/", line 153, in <module>
    tmp['neighbors'].append( extract_neighbor(neighbor) )
  File "/usr/libexec/vyos/op_mode/", line 110, in extract_neighbor
    device['platform'] = chassis[0].getElementsByTagName('descr')[0][: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
    ChassisID:    mac 6c:50:4d:xx:xx:xx
    SysName:      switch51c8b8
    Capability:   Bridge, on
    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
    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

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
---------                 -----     -----  ---   --------             -------



Difficulty level
Unknown (require assessment)
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)