Skip to content

Commit

Permalink
[thermalctld] Fix fan status issue in 201911 (#96)
Browse files Browse the repository at this point in the history
Previous PR #92 has been merged to 201911. The previous fix used a method FanStatus.is_ok, however, the implementation of this method is different between master and 201911. So we need an extra enhance for this issue.

fan status should be true only if FanStatus.is_ok() and fan_status is true.
  • Loading branch information
Junchao-Mellanox authored Sep 25, 2020
1 parent f791bb0 commit f63cecc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sonic-thermalctld/scripts/thermalctld
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ class FanUpdater(logger.Logger):
self._set_fan_led(fan, fan_name, fan_status)

if fan_fault_status != NOT_AVAILABLE:
fan_fault_status = fan_status.is_ok()
fan_fault_status = fan_fault_status and fan_status.is_ok()

fvs = swsscommon.FieldValuePairs(
[('presence', str(presence)),
Expand Down

0 comments on commit f63cecc

Please sign in to comment.