1.4 "show lldp neighbor" broken maybe?

Version: VyOS 1.4-rolling-202307070317

I enabled LLDP and the switch sees the VyOS instance via LLDP fine. However, on the VyOS instance, when I attempt to run show lldp neighbors I get a python traceback:

tech@HYMRVAX0FW0:~$ show lldp neighbors 
Traceback (most recent call last):
  File "/usr/libexec/vyos/op_mode/lldp.py", line 144, in <module>
    res = vyos.opmode.run(sys.modules[__name__])
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/opmode.py", line 263, in run
    res = func(**args)
          ^^^^^^^^^^^^
  File "/usr/libexec/vyos/op_mode/lldp.py", line 44, in _wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/libexec/vyos/op_mode/lldp.py", line 140, in show_neighbors
    return _get_formatted_output(lldp_data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/libexec/vyos/op_mode/lldp.py", line 117, in _get_formatted_output
    tmp.append(platform[:37])
               ~~~~~~~~^^^^^
TypeError: 'NoneType' object is not subscriptable

lldpctl shows the expected output fine:

tech@HYMRVAX0FW0:~$ lldpctl
-------------------------------------------------------------------------------
LLDP neighbors:
-------------------------------------------------------------------------------
Interface:    eth2, via: LLDP, RID: 1, Time: 0 day, 13:15:58
  Chassis:     
    ChassisID:    mac 08:9e:01:82:6d:fe
    SysName:      HYMRVAX0SW0
    MgmtIP:       172.27.2.11
    MgmtIface:    33
    Capability:   Bridge, on
    Capability:   Router, on
  Port:        
    PortID:       mac 08:9e:01:82:6e:13
    PortDescr:    10GigabitEthernet22
    TTL:          120
    MFS:          9216
    Port is aggregated. PortAggregID: 21
    PMD autoneg:  supported: yes, enabled: no
      MAU oper type: 10GigBaseSR - R fiber over 850 nm optics
  LLDP-MED:    
    Device Type:  Network Connectivity Device
    Capability:   Capabilities, yes
    Capability:   Policy, yes
    Capability:   Location, yes
    Capability:   MDI/PSE, yes
-------------------------------------------------------------------------------
Interface:    eth3, via: LLDP, RID: 1, Time: 0 day, 13:15:58
  Chassis:     
    ChassisID:    mac 08:9e:01:82:6d:fe
    SysName:      HYMRVAX0SW0
    MgmtIP:       172.27.2.11
    MgmtIface:    33
    Capability:   Bridge, on
    Capability:   Router, on
  Port:        
    PortID:       mac 08:9e:01:82:6e:12
    PortDescr:    10GigabitEthernet21
    TTL:          120
    MFS:          9216
    Port is aggregated. PortAggregID: 21
    PMD autoneg:  supported: yes, enabled: no
      MAU oper type: 10GigBaseSR - R fiber over 850 nm optics
  LLDP-MED:    
    Device Type:  Network Connectivity Device
    Capability:   Capabilities, yes
    Capability:   Policy, yes
    Capability:   Location, yes
    Capability:   MDI/PSE, yes
-------------------------------------------------------------------------------
tech@HYMRVAX0FW0:~$ 

I’m not sure if this is a me problem or if it’s a bug? I have not yet tried upgrading to the latest rolling release.

And if you try out the latest rolling release of 1.4? :slight_smile:

Still the same error?

I was kinda hoping someone would chime in and say it was fixed in a later release :laughing:.

I will validate this soon and report back.

According to 1.4 Sagitta — VyOS 1.4.x (sagitta) documentation 2023-01-23 was the last time LLDP was touched in the codebase but there is this case ⚓ T5373 LLDP seems to be running even if its disabled on all interfaces that got resolved on 2023-07-21 so I dunno why that dont show up in the changelog.

Wonder if your LLDP issue is covered by any of these cases?

https://vyos.dev/T2287

https://vyos.dev/T3760

I do not believe I am seeing any issues related to T2287 or T3760 as LLDP is working and interface error counters are at expected levels.

As for T5373, I believe I may be experiencing that but never really noticed. In this configuration I am OK with LLDP being enabled across all interfaces so it wasn’t something I was look out for.

At any rate, I’ll get this instance upgraded later today and report back.

Hello, this was fixed in

If you do lldpctl -f json, you’ll likely see there is no descr key in the output, so therefore platform is None, and you can’t index None. PR has a simple check to see if platform is None, and just outputs nothing