SONiC Switch State Service sync daemon for LLDP data.
See the SONiC Website for more information about the SONiC project.
Python library for sonic/redis database syncing
License: Other
SONiC Switch State Service sync daemon for LLDP data.
See the SONiC Website for more information about the SONiC project.
This is seen in the log after the messages reported in sonic-net/sonic-swss#728.
Nov 3 17:50:40.475838 sonic INFO lldp#supervisord: lldp-syncd Exception in thread LldpSyncDaemon:
Nov 3 17:50:40.475999 sonic INFO lldp#supervisord: lldp-syncd Traceback (most recent call last):
Nov 3 17:50:40.476080 sonic INFO lldp#supervisord: lldp-syncd File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
Nov 3 17:50:40.476155 sonic INFO lldp#supervisord: lldp-syncd self.run()
Nov 3 17:50:40.476227 sonic INFO lldp#supervisord: lldp-syncd File "/usr/local/lib/python2.7/dist-packages/sonic_syncd/interface.py", line 45, in run
Nov 3 17:50:40.476301 sonic INFO lldp#supervisord: lldp-syncd parsed_update = self.parse_update(update_obj)
Nov 3 17:50:40.476375 sonic INFO lldp#supervisord: lldp-syncd File "/usr/local/lib/python2.7/dist-packages/lldp_syncd/daemon.py", line 250, in parse_update
Nov 3 17:50:40.476448 sonic INFO lldp#supervisord: lldp-syncd capability_list = self.get_sys_capability_list(if_attributes)
Nov 3 17:50:40.476521 sonic INFO lldp#supervisord: lldp-syncd File "/usr/local/lib/python2.7/dist-packages/lldp_syncd/daemon.py", line 121, in get_sys_capability_list
Nov 3 17:50:40.476595 sonic INFO lldp#supervisord: lldp-syncd capability_list = if_attributes['chassis'].values()[0]['capability']
Nov 3 17:50:40.476668 sonic INFO lldp#supervisord: lldp-syncd TypeError: string indices must be integers
It is found that lldpd is running but the info is missing from the APPL_DB as shown below in the logs.
6-4-dut:$ ps aux | grep lldp_syncd$
root 5386 0.1 0.1 90288 13744 ? Sl 10:51 0:00 python2 -m lldp_syncd
admin 7203 0.0 0.0 4900 532 ttyS0 S+ 10:54 0:00 grep lldp_syncd
6-4-dut:
6-4-dut:$ redis-cli -n 0 hget LLDP_LOC_CHASSIS lldp_loc_sys_cap_supp$
(nil)
6-4-dut:
6-4-dut:$ p$ redis-cli -n 0 keys LLDP
6-4-dut:
(empty list or set)
6-4-dut:$ redis-cli -n 6 keys LLDP$
(empty list or set)
6-4-dut:
There is no neighbor TTL information stored in appDB. We should be able to get this information via appDB rather than using show lldp neighbor
which checks the kernel
admin@sonic:~$ redis-cli
127.0.0.1:6379> KEYS "*LLDP*"
1) "LLDP_ENTRY_TABLE:Ethernet0"
2) "LLDP_ENTRY_TABLE:eth0"
3) "LLDP_LOC_CHASSIS"
127.0.0.1:6379> HGETALL "LLDP_ENTRY_TABLE:Ethernet0"
1) "lldp_rem_chassis_id_subtype"
2) "4"
3) "lldp_rem_sys_name"
4) "OS10"
5) "lldp_rem_index"
6) "2"
7) "lldp_rem_port_desc"
8) "ethernet1/1/1:1"
9) "lldp_rem_sys_cap_supported"
10) "68 00"
11) "lldp_rem_sys_desc"
12) "Dell EMC Networking OS10 Enterprise.\r\nCopyright (c) 1999-2019 by Dell Inc. All Rights Reserved.\r\nSystem Description: OS10 Enterprise.\r\nOS Version: 10.4.9999EX.\r\nSystem Type: Z9100-ON"
13) "lldp_rem_port_id_subtype"
14) "5"
15) "lldp_rem_sys_cap_enabled"
16) "68 00"
17) "lldp_rem_chassis_id"
18) "34:17:eb:2c:d7:00"
19) "lldp_rem_port_id"
20) "ethernet1/1/1:1"
21) "lldp_rem_man_addr"
22) ""
23) "lldp_rem_time_mark"
24) "178301"
127.0.0.1:6379> exit
The applDB still contains entries of LLDP neighbor(s) even when the neighbor goes offline.
Steps to reproduce:
1. shutdown the interface connected to a lldp neighbor.
2. start redis-cli
3. run 'keys "*LLDP*"
4. notice disabled neighbors still in applDB
On my testbed I did:
root@sonic:~# ifconfig eth0 down
root@sonic:~# ifconfig Ethernet0 down
<<< waited until TTL (120s) expired >>>
root@sonic:~# redis-cli -n 0
127.0.0.1:6379> keys "*LLDP*"
1) "LLDP_ENTRY_TABLE:Ethernet0" <<=== should not be here
2) "LLDP_LOC_CHASSIS"
3) "LLDP_ENTRY_TABLE:eth0" <<=== should not be here
127.0.0.1:6379>
From Linux's perspective, there are no neighbors:
root@sonic:~# lldpctl
-------------------------------------------------------------------------------
LLDP neighbors:
-------------------------------------------------------------------------------
root@sonic:~#
version information:
root@sonic:~# show version
SONiC Software Version: SONiC.master.0-dirty-20190717.222513
Distribution: Debian 9.9
Kernel: 4.9.0-9-2-amd64
Build commit: 66ea5b53
Build date: Thu Jul 18 05:40:18 UTC 2019
Built by: ghe@ghe-sonic1
Platform: x86_64-dell_z9100_c2538-r0
HwSKU: Force10-Z9100-C32
ASIC: broadcom
Serial Number: CN03GT5N7793154G0033
Uptime: 00:42:33 up 1 day, 3:57, 1 user, load average: 0.04, 0.10, 0.14
Docker images:
REPOSITORY TAG IMAGE ID SIZE
docker-sonic-mgmt-framework latest a4966c8fb578 413MB
docker-sonic-telemetry latest 9429665feb17 344MB
docker-sonic-telemetry master.0-dirty-20190717.222513 1f517230b92c 305MB
docker-fpm-frr latest a2ac606a41b5 318MB
docker-fpm-frr master.0-dirty-20190717.222513 a2ac606a41b5 318MB
docker-orchagent latest 312692460b8b 318MB
docker-orchagent master.0-dirty-20190717.222513 312692460b8b 318MB
docker-snmp-sv2 latest 66ed850a701c 312MB
docker-snmp-sv2 master.0-dirty-20190717.222513 66ed850a701c 312MB
docker-teamd latest a2e48312bc5d 300MB
docker-teamd master.0-dirty-20190717.222513 a2e48312bc5d 300MB
docker-syncd-brcm latest 35c8d14a2074 391MB
docker-syncd-brcm master.0-dirty-20190717.222513 35c8d14a2074 391MB
docker-lldp-sv2 latest dc5c3e897c47 298MB
docker-lldp-sv2 master.0-dirty-20190717.222513 dc5c3e897c47 298MB
docker-platform-monitor latest ca3c990ab67c 325MB
docker-platform-monitor master.0-dirty-20190717.222513 ca3c990ab67c 325MB
docker-dhcp-relay latest 01c30e7c6c00 287MB
docker-dhcp-relay master.0-dirty-20190717.222513 01c30e7c6c00 287MB
docker-database latest dc332c1fbbd8 279MB
docker-database master.0-dirty-20190717.222513 dc332c1fbbd8 279MB
docker-router-advertiser latest 18ab2795b5cc 278MB
docker-router-advertiser master.0-dirty-20190717.222513 18ab2795b5cc 278MB
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.