Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[system-health] Check fan speed before check fan status #6586

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/system-health/health_checker/hardware_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,6 @@ def _check_fan_status(self, config):
self.set_object_not_ok('Fan', name, '{} is missing'.format(name))
continue

status = data_dict.get('status', 'false')
if status.lower() != 'true':
self.set_object_not_ok('Fan', name, '{} is broken'.format(name))
continue

if not self._ignore_check(config.ignore_devices, 'fan', name, 'speed'):
speed = data_dict.get('speed', None)
speed_target = data_dict.get('speed_target', None)
Expand Down Expand Up @@ -130,6 +125,11 @@ def _check_fan_status(self, config):
speed_tolerance))
continue

status = data_dict.get('status', 'false')
if status.lower() != 'true':
self.set_object_not_ok('Fan', name, '{} is broken'.format(name))
continue

self.set_object_ok('Fan', name)

def _check_psu_status(self, config):
Expand Down