sonic-net / sonic-platform-daemons

Platform module daemons for SONiC
Other
25 stars 159 forks source link

[xcvrd] Fix issue: do not print error log when module support non-ethernet application #501

Closed Junchao-Mellanox closed 5 months ago

Junchao-Mellanox commented 5 months ago

Description

In function get_interface_speed, it will log an error if the application name does not contain a valid speed. However, many modules support both ethernet and non-ethernet (e.g. IB) application, non-ethernet application would not contain a valid speed. For such module, the function get_interface_speed logs an error to syslog:

Jun 12 20:09:57.315556 sonic ERR pmon#xcvrd: No interface speed found for: 'IB HDR (Arch.Spec.Vol.2)'

Actually, this is not an error because the module will finally find a proper application via the for loop in function get_cmis_application_desired

Motivation and Context

Remove the unexpected error log since it could be a false alarm. Also, log the module applications if it cannot find a proper application.

How Has This Been Tested?

Manual test

Additional Information (Optional)

mssonicbld commented 5 months ago

Cherry-pick PR to 202311: https://github.com/sonic-net/sonic-platform-daemons/pull/504

mssonicbld commented 4 months ago

Cherry-pick PR to 202405: https://github.com/sonic-net/sonic-platform-daemons/pull/527

Junchao-Mellanox commented 3 months ago

The auto create PR for 202405 has got a conflict. Manually created backport PR for 202405: https://github.com/sonic-net/sonic-platform-daemons/pull/532 @bingwang-ms , could you please help merge that?