sonic-buildimage/platform/mellanox/mlnx-platform-api
Vadym Hlushko 3530fdbea1 [SFP] Change logging severity when failed to read EEPROM (#13011)
- Why I did it
In order to prevent the sonic-mgmt/tests/platform_tests/sfp/test_sfputil.py test failing on the log analyzer step.

The mentioned test is performing the sfputil reset EthernetX for every interface on the SONiC switch, this action will flap the SFP device status (INSTERTED -> REMOVED -> INSTERTED).

The SONiC XCVRD daemon will catch this SFP device status change (because it is monitoring the presence status of the cable).
To judge the cable presence status, currently, we are still leveraging to read the first bytes of the EEPROM, and the EEPROM could be not ready at some moment and the SONiC XCVRD daemon will print the error log to Syslog:

ERR pmon#xcvrd: Error! Unable to read data for 'xx' port, page 'xx' offset 128, rc = 1, err msg: Sending access register

- How I did it
Change logging severity from ERR to WARNING

- How to verify it
Run the sonic-mgmt/tests/platform_tests/sfp/test_sfputil.py

OR much faster way to run the next script on the switch:

#!/bin/bash

START=0
END=248

for (( intf=$START; intf<=$END; intf+=8))
do
    sfputil reset Ethernet"${intf}"
done

sfputil show presence
2023-02-04 02:36:51 +08:00
..
sonic_platform [SFP] Change logging severity when failed to read EEPROM (#13011) 2023-02-04 02:36:51 +08:00
tests [Mellanox] Skip the leftover hardware reboot cause in case of last boot is warm/fast reboot (#13246) 2023-01-31 18:34:36 +08:00
.gitignore [Mellanox] Refactor Mellanox platform API to support dynamic port configuration (#8422) 2021-10-25 07:59:06 +03:00
pytest.ini [Mellanox] Refactor Mellanox platform API to support dynamic port configuration (#8422) 2021-10-25 07:59:06 +03:00
setup.cfg Add thermal control support for SONiC (#3949) 2020-03-09 10:41:10 -07:00
setup.py [Mellanox] Add NVIDIA Copyright header to "mellanox" files (#8799) 2021-10-17 19:03:02 +03:00