Open seanwu-ec opened 3 years ago
@adyeung will take a look
@seanwu-ec Thanks for raising this. Your suggestion seems correct but I need to test some more as we didn't enable thermalctld locally (or enabled it with some restrictions). I will work on it and push the fix.
Understood. I appreciate that, @FuzailBrcm.
If you know any downsides or reasons that we should not enable thermalctld, please kindly let us know. Recently we are enabling it back because some customers complained show platform fan/temperature
doesn't work.
Added the fix for this issue as part of https://github.com/Azure/sonic-buildimage/pull/7834
Description
PSU Fan status is always NOT OK while pmon's thermalctld is enabled. As below:
Suggestion for change
While it is PSU fan, PddfFan.get_target_speed() should raise NotImplementedError instead of returning 0. https://github.com/Azure/sonic-buildimage/blob/4f2bc1fbeddc49af62c8f1acb748e251d043e792/platform/pddf/platform-api-pddf-base/sonic_platform_pddf_base/pddf_fan.py#L227 Otherwise, PSU fan will fail the over_speed check all the time while the real speed is much greater than 0% https://github.com/Azure/sonic-platform-daemons/blob/2d2749ab77ea0cfb9b1a9a0a5c7eeffbde9daed8/sonic-thermalctld/scripts/thermalctld#L349
Steps to reproduce the issue:
python3 /usr/local/bin/thermalctld
)show platform fan
. You will see PSU Fan status is Not OK.Describe the results you received:
PSU fan status should be 'OK'
Describe the results you expected:
PSU fan status is 'Not OK'
Output of
show version
: