From f63cecc5da05f01f15ab6b16d2634012fc5d0169 Mon Sep 17 00:00:00 2001 From: Junchao-Mellanox <57339448+Junchao-Mellanox@users.noreply.github.com> Date: Fri, 25 Sep 2020 09:19:19 +0800 Subject: [PATCH] [thermalctld] Fix fan status issue in 201911 (#96) 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. --- sonic-thermalctld/scripts/thermalctld | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonic-thermalctld/scripts/thermalctld b/sonic-thermalctld/scripts/thermalctld index 3a50fbfae..dc3107755 100644 --- a/sonic-thermalctld/scripts/thermalctld +++ b/sonic-thermalctld/scripts/thermalctld @@ -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)),