-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
add asic sensors info parsing in minigraph.py for enabling ASIC thermal mo… #19068
Conversation
…nitoring Signed-off-by: tudupa <tanmaya.udupa@nokia.com>
/azpw ms_conflict |
@@ -1234,8 +1235,13 @@ def parse_deviceinfo(meta, hwsku): | |||
if hostname is not None: | |||
key = "%s|%s" % (hostname.text, key) | |||
sys_ports[key] = {"system_port_id": system_port_id, "switch_id": switch_id, "core_index": core_id, "core_port_index": core_port_id, "speed": speed, "num_voq": num_voq} | |||
|
|||
return port_speeds, port_descriptions, sys_ports | |||
asic_sensor = device_info.find(str(QName(ns,"AsicSensors"))) |
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.
We don't have "AsicSensors" and the attributes in the production minigraph for SUP and Linecard.
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.
I think we should have a control parameter eg: poller, similar to "controllable" here in platform.json file to control this,
"controllable": false |
If the new control flag we add is true, for any of the ASIC* thermals, we can include the ASIC_SENSOR config in config_db.
"ASIC_SENSORS": {
"ASIC_SENSORS_POLLER_INTERVAL": {
"interval": "10"
},
"ASIC_SENSORS_POLLER_STATUS": {
"admin_status": "enable"
}
},
The Poller interval could be controllable too if we can add it to thermals in platform.json. If this is agreeable, we can update/reach out to authors of https://github.com/sonic-net/SONiC/blob/master/doc/asic_thermal_monitoring_hld.md (REF : sonic-net/SONiC#557)
@prgeor to comment, Any other platforms use ASIC_SENSOR config now?
@kenneth-arista @anamehra to review too to check if these ASIC_SENSORS config is needed in other platforms -- to get the ASIC thermals. |
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.
@judyjoseph I don't think we should add platform specific sensor details in minigraph. The HLD quoted is quite old.
Yes we should not take it from minigraph We could have a flag eg: sai_asic_poll : true/false based on which we can push this above attributes to config_db ? Have to make sure it is backward compatible too. |
@judyjoseph @prgeor The following is the proposal. This proposal is similar to the Fabirc port monitoring for chassis. Please check if this is the right approach. Thanks.
|
How will |
asic_sensor config will be appled to all asic and includes the localhost namespace. |
I don't think this can be done in the 202205 branch on Nokia platform. Nokia platform has its NDK to manager/monitor the temperature and let Supervisor card drive its FAN speed. |
To add Prince, we have this functionality to poll the ASIC sensors from swss for a while now. sonic-net/sonic-swss#1517. We could use this existing method instead of a new sensord daemon, I see the new daemon is mainly for other non-asic platform sensors. |
@bmridul : Can you provide your inputs/comment on this ? |
Reviving this discussion to get this PR merged : @mlok-nokia Can we add this data to /usr/share/sonic/device/x86_64-nokia_ixr7250e_36x400g-r0/platform.json itself as a new json file
We could add the parsing of these new attributes from platform file in minigraph.py itself. We do similar parsing in portconfig.py today. |
Hi Judy, In regards to the PR, I prefer that the data come from platform.json as you suggested. |
@judyjoseph has new design to use platform.json to achieve this. closing this approach. @mlok-nokia @anamehra @kenneth-arista for viz. |
@mlok-nokia I have the approach updated in this HLD : sonic-net/SONiC#1841. Since this attribute is not actually derived from minigraph.xml, I think we should parse platform.json and push to DB in config/main.py:load_minigraph() ? |
…nitoring
Why I did it
ASIC thermal monitoring needs to be enabled for Nokia platforms. This PR helps enable ASIC thermal monitoring via minigraph.xml. minigraph.py parses Asic sensors information present in the minigraph.xml to enable support for ASIC sensors.
For more information on ASIC thermal monitoring, please refer to https://github.com/sonic-net/SONiC/blob/master/doc/asic_thermal_monitoring_hld.md
Work item tracking
How I did it
Added support in minigraph.py to parse asic sensors information present in the DeviceInfo section of the minigraph.xml. It parses the AsicSensors section of the minigraph.xml and sonic-cfggen then writes the parsed entry into the config_db.
How to verify it
A unit test test_minigraph_asic_sensors is written in test_minigraph_case.py to parse a sample minigraph.xml containing the asic_sensors information and is verified that the test passes. This was verified by running make target/python-wheels/bookworm/sonic_config_engine-1.0-py3-none-any.whl.
Other tests include
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)