aristanetworks / sonic

Open source drivers and initialization library for Arista platforms running SONiC
GNU General Public License v2.0
22 stars 30 forks source link

A7060 - Ledd returning error #18

Closed prsunny closed 6 years ago

prsunny commented 6 years ago

Observed the following issue with ledd.

root@str-7060cx-acs-10:/# /usr/bin/ledd Traceback (most recent call last): File "/usr/bin/ledd", line 235, in main() File "/usr/bin/ledd", line 222, in main led_control.port_link_state_change(port_name, port_status_dict[port_name]) File "/usr/lib/python2.7/dist-packages/arista/utils/sonic_leds.py", line 70, in port_link_state_change portNum = self.portMapping[port].portNum KeyError: 'PortInitDone'

root@str-7060cx-acs-10:/# ls /usr/share/sonic/hwsku/port_config.ini /usr/share/sonic/hwsku/port_config.ini

This is resulting in continuous failure logs in syslog:

Oct 31 23:05:26.121718 str-7060cx-acs-10 INFO pmon.sh[1263]: 2017-10-31 23:05:26,121 INFO exited: ledd (exit status 1; not expected) Oct 31 23:05:27.126468 str-7060cx-acs-10 INFO pmon.sh[1263]: 2017-10-31 23:05:27,125 INFO spawned: 'ledd' with pid 11281 Oct 31 23:05:27.211673 str-7060cx-acs-10 INFO ledd: Starting up... Oct 31 23:05:27.745843 str-7060cx-acs-10 INFO ledd: Loaded module 'led_control'. Oct 31 23:05:27.750921 str-7060cx-acs-10 INFO ledd: Instantiated class 'led_control.LedControl'. Oct 31 23:05:27.752715 str-7060cx-acs-10 INFO supervisord: ledd Traceback (most recent call last): Oct 31 23:05:27.753070 str-7060cx-acs-10 INFO pmon.sh[1263]: 2017-10-31 23:05:27,752 INFO success: ledd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs) Oct 31 23:05:27.753368 str-7060cx-acs-10 INFO supervisord: ledd File "/usr/bin/ledd", line 235, in Oct 31 23:05:27.753749 str-7060cx-acs-10 INFO supervisord: ledd main() Oct 31 23:05:27.753749 str-7060cx-acs-10 INFO supervisord: ledd File "/usr/bin/ledd", line 222, in main Oct 31 23:05:27.753892 str-7060cx-acs-10 INFO supervisord: ledd led_control.port_link_state_change(port_name, port_status_dict[port_name]) Oct 31 23:05:27.753892 str-7060cx-acs-10 INFO supervisord: ledd File "/usr/lib/python2.7/dist-packages/arista/utils/sonic_leds.py", line 70, in port_link_state_change Oct 31 23:05:27.753892 str-7060cx-acs-10 INFO supervisord: ledd portNum = self.portMapping[port].portNum Oct 31 23:05:27.753892 str-7060cx-acs-10 INFO supervisord: ledd KeyError: 'PortInitDone'

Staphylo commented 6 years ago

Our implementation of port_link_state_change is not handling unknown port values. We will make our implementation more resilient.