-
Notifications
You must be signed in to change notification settings - Fork 163
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
thermalctld: Add support for fans on non-CPU modules #555
thermalctld: Add support for fans on non-CPU modules #555
Conversation
@bmridul and @mlok-nokia can you help check this . does this need sonic change or we should push this into platform implementation. |
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.
LGTM
Just want to higlight that this change has a dependency of this PR mentioned by Author in the PR description: |
@bmridul , @mlok-nokia ping again |
I like this change! But at the same time, I think support should be added to include fans from all possible locations, not just add |
This already exists today; any fan in a fan drawer on the chassis is already displayed. This PR is just adding missing output for fans that are attached to modules. |
I'm referring specifically to fans not in a physical fan drawer (adding |
except Exception as e: | ||
self.log_warning('Failed to update fan status - {}'.format(repr(e))) | ||
|
||
for module_index, module in enumerate(self.chassis.get_all_modules()): |
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.
Thermals first check is_chassis_system
before looping over module
details, should that be done here as well? Or it's perhaps an unnecessary check there? https://github.com/sonic-net/sonic-platform-daemons/blob/master/sonic-thermalctld/scripts/thermalctld#L599 That also looks at PSUs connected to the modules, which may themselves have fans.
The PR title describes this as only for non-CPU modules, but it looks like that is not actually a limitation; won't this get all fans in any module where they are configured? Not necessarily a bad thing, but worth noting.
PR
I think these 2 PR can be pushed independently. PR20603 is just Arista's platform specified code. |
Discussed during chassis meeting, this should be implemented in a follow-up PR, as it widens the scope to affect not just chassis but also fixed systems. |
@assrinivasan please help take a quick look of this PR content to see if you have any concerns especially for non-chassis platforms while @prgeor is out of office. |
@patrickmacarthur Can you please confirm this change will not break the CLI in single ASIC platform? |
Description
This adds support to the
show platform fans
command to show fans that are on modules.Motivation and Context
In the current Arista chassis model, the chassis fans are returned by
Module.get_all_fans()
as opposed toFanDrawer.get_all_fans()
, which currently thermalctld makes no provision for. This change allows fans that are under the modules to be listed in the command output.How Has This Been Tested?
This has been tested internally on a chassis, and the fan output now includes all fans on the chassis as opposed to just PSU fans:
Additional Information (Optional)
Platform library support change sonic-net/sonic-buildimage#20929 should be merged before this change.