Page MenuHomeVyOS Platform

show lldp neighbor Traceback error
Closed, ResolvedPublicBUG

Description

vyos:~$ show configuration commands | match lldp
set service lldp interface eth0
vyos:~$ show lldp neighbors interface eth0
Traceback (most recent call last):
  File "/usr/libexec/vyos/op_mode/lldp_op.py", line 121, in <module>
    config_text = tmpl.render(parse_data(neighbors, interface=args.interface))
  File "/usr/libexec/vyos/op_mode/lldp_op.py", line 58, in parse_data
    capabilities = c_value['capability']
KeyError: 'capability'
vyos:~$ sudo lldpcli show ne
-------------------------------------------------------------------------------
LLDP neighbors:
-------------------------------------------------------------------------------
Interface:    eth0, via: LLDP, RID: 1, Time: 0 day, 00:04:18
  Chassis:     
    ChassisID:    mac 3c:61:04:5b:68:c0
    SysDescr:     Juniper Networks, Inc. ex2200-c-12t-2g , version 11.4R7.5 Build date: 2013-03-01 09:18:42 UTC 
    Capability:   Bridge, on
    Capability:   Router, on
  Port:        
    PortID:       local 521
    PortDescr:    ge-0/0/9.0
    TTL:          120
  Unknown TLVs:
    TLV:          OUI: 00,90,69, SubType: 1, Len: 12 47,50,30,32,31,33,33,36,30,36,39,36
-------------------------------------------------------------------------------

Details

Difficulty level
Easy (less than an hour)
Version
VyOS 1.4-rolling-202111160742
Why the issue appeared?
Design mistake
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

@daniil Can you provide the output of json format?

lldpcli -f json show neighbors

Can't reproduce it

vyos@r11-roll:~$ show lldp neighbors interface eth1
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
---------                 -----     -----  ---   --------             -------
r4-epa2                   eth1      LLDP   R     VyOS 1.3-beta-2021   Lan
{
  "lldp": {
    "interface": [
      {
        "eth0": {
          "via": "LLDP",
          "rid": "5",
          "age": "0 day, 00:00:16",
          "chassis": {
            "id": {
              "type": "mac",
              "value": "3c:61:04:5b:68:c0"
            },
            "descr": "Juniper Networks, Inc. ex2200-c-12t-2g , version 11.4R7.5 Build date: 2013-03-01 09:18:42 UTC ",
            "capability": [
              {
                "type": "Bridge",
                "enabled": true
              },
              {
                "type": "Router",
                "enabled": true
              }
            ]
          },
          "port": {
            "id": {
              "type": "local",
              "value": "521"
            },
            "descr": "ge-0/0/9.0",
            "ttl": "120"
          },
          "unknown-tlvs": {
            "unknown-tlv": {
              "oui": "00,90,69",
              "subtype": "1",
              "len": "12",
              "value": "47,50,30,32,31,33,33,36,30,36,39,36"
            }
          }
        }
      }
    ]
  }
}
c-po triaged this task as Normal priority.
c-po moved this task from Need Triage to Finished on the VyOS 1.4 Sagitta board.
c-po moved this task from Need Triage to Finished on the VyOS 1.3 Equuleus (1.3.0) board.
c-po changed Difficulty level from Normal (likely a few hours) to Easy (less than an hour).
c-po changed Why the issue appeared? from Will be filled on close to Design mistake.
c-po changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.
c-po changed Issue type from Unspecified (please specify) to Bug (incorrect behavior).