-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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] Add fan direction check for system health #14509
[system-health] Add fan direction check for system health #14509
Conversation
/azpw run Azure.sonic-buildimage |
/AzurePipelines run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
/azpw run Azure.sonic-buildimage |
/AzurePipelines run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
Hi @qiluo-msft , @prgeor , could you please help review this? |
}, | ||
'FAN_INFO|fan2': { | ||
'presence': 'False', | ||
'status': 'True', | ||
'speed': '60', | ||
'speed_target': '60', | ||
'speed_tolerance': '20' | ||
'speed_tolerance': '20', | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this extra line is needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@prgeor your comments are very welcome. can you please review? |
@@ -82,6 +82,7 @@ def _check_fan_status(self, config): | |||
self.set_object_not_ok('Fan', 'Fan', 'Failed to get fan information') | |||
return | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Junchao-Mellanox please update the description of the _check_fan_status() to include fan direction check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
if not expect_fan_direction: | ||
# initialize the expect fan direction | ||
expect_fan_direction = (name, direction) | ||
elif direction != expect_fan_direction[1]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Junchao-Mellanox I don't understand why expect_fan_direction
depends upon the direction
value against which it is checking?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, it is depending on the first fan's direction. There is no platform API to get expected fan direction, so we try to get the first fan direction and set it as the expected value.
/azpw run Azure.sonic-buildimage |
/AzurePipelines run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
/azpw run Azure.sonic-buildimage |
/AzurePipelines run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
Hi @StormLiangMS , could you please help cherry-pick to 202211? |
…14509) - Why I did it Add fan direction check to system health, all fans should be in the same direction - How I did it Add fan direction check to system health, all fans should be in the same direction - How to verify it Manual test Unit test Added sonic-mgmt test case to verify
Cherry-pick PR to 202211: #15415 |
- Why I did it Add fan direction check to system health, all fans should be in the same direction - How I did it Add fan direction check to system health, all fans should be in the same direction - How to verify it Manual test Unit test Added sonic-mgmt test case to verify
Why I did it
Add fan direction check to system health, all fans should be in the same direction
How I did it
Add fan direction check to system health, all fans should be in the same direction
How to verify it
Manual test
Unit test
Added sonic-mgmt test case to verify
Which release branch to backport (provide reason below if selected)
Description for the changelog
Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)