Skip to content

[Mellanox] Fix thermal_updater polling interval get issue#25031

Merged
liat-grozovik merged 2 commits intosonic-net:masterfrom
jianyuewu:thermal_match_poll_key
Jan 29, 2026
Merged

[Mellanox] Fix thermal_updater polling interval get issue#25031
liat-grozovik merged 2 commits intosonic-net:masterfrom
jianyuewu:thermal_match_poll_key

Conversation

@jianyuewu
Copy link
Contributor

Why I did it

The thermal updater's load_tc_config method was unable to correctly parse tc_config files that use regex-based parameter.

How I did it

  1. Added _find_matching_key method: Implements regex pattern matching to find parameter keys in dictionary.
  2. Updated load_tc_config method:
    • Changed ASIC parameter lookup to use regex pattern r'asic\\d*'
    • Changed Module parameter lookup to use regex pattern r'module\\d+'

How to verify it

Test in switch, check if corrected parsed.

Which release branch to backport (provide reason below if selected)

  • 202412
  • 202511

Tested branch (Please provide the tested image version)

202511

@jianyuewu jianyuewu requested a review from lguohan as a code owner January 12, 2026 06:28
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines failed to run 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Jianyue Wu <jianyuew@nvidia.com>
@jianyuewu jianyuewu force-pushed the thermal_match_poll_key branch from b0e754c to 13d3ac0 Compare January 28, 2026 08:25
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liat-grozovik liat-grozovik merged commit fa509da into sonic-net:master Jan 29, 2026
14 checks passed
@liat-grozovik
Copy link
Collaborator

@jianyuewu can you please have a dedicated PR for 202511 due to conflict?
also, it was mentioned needed for 202412 but no label. Can you please clarify if this is needed for 202412 and if this there is a conflict please raise a direct PR

@jianyuewu
Copy link
Contributor Author

@jianyuewu can you please have a dedicated PR for 202511 due to conflict? also, it was mentioned needed for 202412 but no label. Can you please clarify if this is needed for 202412 and if this there is a conflict please raise a direct PR

@liat-grozovik Sure.
PR created for 202511: #25258.
Label added for 202412. Yes, we also need it in 202412, because hw-mgmt also changed the config in 202412, we need adapt the change. PR for 202412: Azure/sonic-buildimage-msft#1960

@r12f
Copy link
Contributor

r12f commented Feb 1, 2026

merged in 202412.

@r12f
Copy link
Contributor

r12f commented Feb 1, 2026

thanks @jianyuewu !

@jianyuewu
Copy link
Contributor Author

Thank you @r12f 😊

xincunli-sonic pushed a commit to xincunli-sonic/sonic-buildimage that referenced this pull request Feb 2, 2026
…25031)

- Why I did it
The thermal updater's load_tc_config method was unable to correctly parse tc_config files that use regex-based parameter.

- How I did it
Added _find_matching_key method: Implements regex pattern matching to find parameter keys in dictionary.
Updated load_tc_config method:
Changed ASIC parameter lookup to use regex pattern r'asic\\d*'
Changed Module parameter lookup to use regex pattern r'module\\d+'

- How to verify it
Test in switch, check if corrected parsed.

Signed-off-by: Jianyue Wu <jianyuew@nvidia.com>
Signed-off-by: Xincun Li <stli@microsoft.com>
FengPan-Frank pushed a commit to FengPan-Frank/sonic-buildimage that referenced this pull request Mar 6, 2026
…25031)

- Why I did it
The thermal updater's load_tc_config method was unable to correctly parse tc_config files that use regex-based parameter.

- How I did it
Added _find_matching_key method: Implements regex pattern matching to find parameter keys in dictionary.
Updated load_tc_config method:
Changed ASIC parameter lookup to use regex pattern r'asic\\d*'
Changed Module parameter lookup to use regex pattern r'module\\d+'

- How to verify it
Test in switch, check if corrected parsed.

Signed-off-by: Jianyue Wu <jianyuew@nvidia.com>
Signed-off-by: Feng Pan <fenpan@microsoft.com>
dprital pushed a commit that referenced this pull request Mar 19, 2026
- Why I did it
The thermal updater's load_tc_config method was unable to correctly parse tc_config files that use regex-based parameter.

- How I did it
Added _find_matching_key method: Implements regex pattern matching to find parameter keys in dictionary.
Updated load_tc_config method:
Changed ASIC parameter lookup to use regex pattern r'asic\\d*'
Changed Module parameter lookup to use regex pattern r'module\\d+'

- How to verify it
Test in switch, check if corrected parsed.

Signed-off-by: Jianyue Wu <jianyuew@nvidia.com>
Signed-off-by: dprital <drorp@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants