sonic-buildimage/src/system-health
spilkey-cisco 3b982c073c Fix system-health hardware_checker to consume fan tolerance details (#16689)
Why I did it

Fan tolerance checking is done through new APIs, is_under_speed and is_over_speed, which populate corresponding fields into the database. speed_tolerance is no longer used and was removed, but system-health was not updated and indicates failures:

ADO: 25279165

root@sonic/# show system-health summary
System status summary

  System status LED  red_blink
  Services:
    Status: OK
  Hardware:
    Status: Not OK
    Reasons: Failed to get speed tolerance for fantray5.fan1
	     Failed to get speed tolerance for fantray5.fan0
	     Failed to get speed tolerance for fantray4.fan1
	     Failed to get speed tolerance for fantray4.fan0
	     Failed to get speed tolerance for fantray3.fan1
	     Failed to get speed tolerance for fantray3.fan0
	     Failed to get speed tolerance for fantray2.fan1
	     Failed to get speed tolerance for fantray2.fan0
	     Failed to get speed tolerance for fantray1.fan1
	     Failed to get speed tolerance for fantray1.fan0
	     Failed to get speed tolerance for fantray0.fan1
	     Failed to get speed tolerance for fantray0.fan0
	     Failed to get speed tolerance for PSU1.fan0
	     Failed to get speed tolerance for PSU0.fan0

How I did it
Updated hardware_checker.py in system-health to consume new is_under_speed and is_over_speed database entries instead of speed_tolerance and hard-coded calculations.

How to verify it
root@sonic:/# show system-health summary
System status summary

  System status LED  green
  Services:
    Status: OK
  Hardware:
    Status: OK
2024-02-02 14:33:14 +08:00
..
health_checker Fix system-health hardware_checker to consume fan tolerance details (#16689) 2024-02-02 14:33:14 +08:00
scripts [healthd] Use unix_socket_path instead of loopback ip (#14843) 2023-05-26 15:49:21 +03:00
tests Fix system-health hardware_checker to consume fan tolerance details (#16689) 2024-02-02 14:33:14 +08:00
.gitignore [system-health] Update .gitignore file (#5688) 2020-10-22 11:58:27 -07:00
pytest.ini [system-health] Make check interval more accurate (#14085) 2023-03-15 07:21:00 +02:00
setup.cfg [system-health] Add support for monitoring system health (#4835) 2020-10-12 11:12:49 +03:00
setup.py Check SONiC dependencies before installation. (#13850) 2023-03-02 08:20:39 +08:00