sonic-buildimage
sonic-buildimage copied to clipboard
[Mellanox]PSU sensors dynamic configuration
Why I did it
Previously, the PSU sensor configuration inside sensors.conf is hardcoded for each platform, allowing no flexibility for other PSU combination possibilities. However, there exists a scenario that user has a second source of PSU which has different sensors compared to the original sensors.conf. Thereby it requires the system to have the ability to dynamically detect the PSU model in using and load relevant sensor’s configuration file.
Note: Run-time detect PSU changing and reload relevant sensor configurations is out of scope.
How I did it
This PR involves a new script and a corresponding data file which contains all PSU model’s sensor configuration info. The script reads the hardware PSU information through hw-management and determines its model. Based on that, it searches for the corresponding pre-defined PSU sensor data, integrate them into the sensors.conf, and let PMON copy it for further loading by lm-sensor.
How to verify it
use sensors command and check the psu section is rightly labeled.
Which release branch to backport (provide reason below if selected)
- [ ] 201811
- [ ] 201911
- [ ] 202006
- [ ] 202012
- [ ] 202106
- [ ] 202111
- [ ] 202205
- [ ] 202211
- [ ] 202305
Tested branch (Please provide the tested image version)
- [x] 202311
- [ ]
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)
/azpw run Azure.sonic-buildimage
/AzurePipelines run Azure.sonic-buildimage
Azure Pipelines successfully started running 1 pipeline(s).
/AzurePipelines run Azure.sonic-buildimage
Commenter does not have sufficient privileges for PR 18528 in repo sonic-net/sonic-buildimage
/azpw run Azure.sonic-buildimage
/AzurePipelines run Azure.sonic-buildimage
Azure Pipelines successfully started running 1 pipeline(s).
LGTM but you are missing recent new device SN5400. Please add the relevant changes to this device as well
I have updated relevant changes according to SN5400 sensor configuration file.
/azpw ms_conflict
/azpw ms_conflict -f
Cherry-pick PR to 202405: https://github.com/sonic-net/sonic-buildimage/pull/19291
Cherry-pick PR to 202311: https://github.com/sonic-net/sonic-buildimage/pull/19801