[Mellanox]PSU sensors dynamic configuration#18528
Merged
liat-grozovik merged 3 commits intosonic-net:masterfrom Jun 11, 2024
Merged
[Mellanox]PSU sensors dynamic configuration#18528liat-grozovik merged 3 commits intosonic-net:masterfrom
liat-grozovik merged 3 commits intosonic-net:masterfrom
Conversation
482cb5d to
0fd69b7
Compare
Contributor
Author
|
/azpw run Azure.sonic-buildimage |
Collaborator
|
/AzurePipelines run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
keboliu
approved these changes
Apr 15, 2024
liat-grozovik
requested changes
Apr 15, 2024
0fd69b7 to
1060d66
Compare
db8c1f1 to
1060d66
Compare
prgeor
reviewed
Apr 29, 2024
prgeor
reviewed
Apr 29, 2024
device/mellanox/x86_64-mlnx_msn2700-r0/psu_sensors_conf_updater
Outdated
Show resolved
Hide resolved
1f70f0e to
aa1f312
Compare
Contributor
Author
|
/AzurePipelines run Azure.sonic-buildimage |
|
Commenter does not have sufficient privileges for PR 18528 in repo sonic-net/sonic-buildimage |
Contributor
Author
|
/azpw run Azure.sonic-buildimage |
Collaborator
|
/AzurePipelines run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
9413eb3 to
33e3d9b
Compare
Collaborator
liat-grozovik
left a comment
There was a problem hiding this comment.
LGTM but you are missing recent new device SN5400. Please add the relevant changes to this device as well
Signed-off-by: Yuanzhe, Liu <[email protected]>
Contributor
Author
|
/azpw ms_conflict |
add a script to dynamically update the original sensors.conf psu section to match the currently used psu model. add a json file to store related platform and psu info. simx revision is irrelevant, so there is no change on it. Signed-off-by: Yuanzhe, Liu <[email protected]>
once the get_model api detect a psu model changing, it would firstly regenerate sensors.conf and then restart sensord to active the new configuration. Signed-off-by: Yuanzhe, Liu <[email protected]>
d6d9dfb to
2f12d00
Compare
Contributor
|
/azpw ms_conflict -f |
prgeor
approved these changes
May 30, 2024
liat-grozovik
approved these changes
Jun 11, 2024
mssonicbld
pushed a commit
to mssonicbld/sonic-buildimage
that referenced
this pull request
Jun 12, 2024
- 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. - 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. It also integrates the script inside the platform's get_model() API. Therefore, each time this API is called by the psud code, it checks whether there has been a change in the PSU model. If a change is detected, it updates the PSU sensors configuration by calling the script. - How to verify it use sensors command and check the psu section is rightly labeled. Signed-off-by: Yuanzhe, Liu <[email protected]>
Collaborator
|
Cherry-pick PR to 202405: #19291 |
mssonicbld
pushed a commit
that referenced
this pull request
Jun 15, 2024
- 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. - 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. It also integrates the script inside the platform's get_model() API. Therefore, each time this API is called by the psud code, it checks whether there has been a change in the PSU model. If a change is detected, it updates the PSU sensors configuration by calling the script. - How to verify it use sensors command and check the psu section is rightly labeled. Signed-off-by: Yuanzhe, Liu <[email protected]>
11 tasks
13 tasks
mssonicbld
pushed a commit
to mssonicbld/sonic-buildimage
that referenced
this pull request
Aug 2, 2024
- 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. - 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. It also integrates the script inside the platform's get_model() API. Therefore, each time this API is called by the psud code, it checks whether there has been a change in the PSU model. If a change is detected, it updates the PSU sensors configuration by calling the script. - How to verify it use sensors command and check the psu section is rightly labeled. Signed-off-by: Yuanzhe, Liu <[email protected]>
Collaborator
|
Cherry-pick PR to 202311: #19801 |
mssonicbld
pushed a commit
that referenced
this pull request
Aug 3, 2024
- 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. - 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. It also integrates the script inside the platform's get_model() API. Therefore, each time this API is called by the psud code, it checks whether there has been a change in the PSU model. If a change is detected, it updates the PSU sensors configuration by calling the script. - How to verify it use sensors command and check the psu section is rightly labeled. Signed-off-by: Yuanzhe, Liu <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
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.
It also integrates the script inside the platform's get_model() API. Therefore, each time this API is called by the psud code, it checks whether there has been a change in the PSU model. If a change is detected, it updates the PSU sensors configuration by calling the script.
How to verify it
use
sensorscommand and check the psu section is rightly labeled.Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)