Skip to content

Loganalyzer ignore tam st stats#23130

Merged
StormLiangMS merged 2 commits intosonic-net:masterfrom
pdam-arista:loganalyzer-ignore-tam-st-stats
Mar 19, 2026
Merged

Loganalyzer ignore tam st stats#23130
StormLiangMS merged 2 commits intosonic-net:masterfrom
pdam-arista:loganalyzer-ignore-tam-st-stats

Conversation

@pdam-arista
Copy link
Copy Markdown
Contributor

Description of PR

Some older platforms like Broadcom TH2/TD3 do not
support TAM (Telemetry and Monitoring) ST (Stream Telemetry) Stats capabilities.
When the function sai_query_stats_st_capability is called on these platforms,
it returns SAI_STATUS_NOT_SUPPORTED (error -2).
This error is expected behavior on platforms without TAM ST
support and should not cause test failures. This patch adds
the error to the loganalyzer ignore list to prevent false
test failures.

Summary:
Fixes #22893

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
  • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202205
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511

Approach

What is the motivation for this PR?

During test execution on platforms that don't support TAM (Telemetry and Monitoring) ST (Stream Telemetry) Stats capabilities, the loganalyzer detects the following error message and causes tests to fail:
ERR syncd#syncd: [none] SAI_API_SWITCH:sai_query_stats_st_capability: Get TAM ST Stats capabilities failed with error -2
This error is expected behavior on platforms without TAM ST support. The SAI layer queries for TAM ST Stats capabilities, and unsupported platforms correctly return SAI_STATUS_NOT_SUPPORTED (error -2).
However, loganalyzer currently treats this as a test failure, resulting in false positives.

How did you do it?

Added a new ignore pattern to ansible/roles/test/files/tools/loganalyzer/loganalyzer_common_ignore.txt at line 38:
r, ".* ERR syncd#syncd: [none] SAI_API_SWITCH:sai_query_stats_st_capability:\d+ Get TAM ST Stats capabilities failed with error -2.*"

How did you verify/test it?

pfcwd/test_pfcwd_cli.py::test_pfcwd_show_stat[IPv6-ld301] ERROR
pfcwd/test_pfcwd_cli.py::test_pfcwd_show_stat[IPv4-ld301] ERROR
Result: 2 passed, 2 errors in 2859.92s
With fix:

All tests pass without loganalyzer errors
Result: 2 passed, 0 errors in 2686.99s

Any platform specific information?

None

Supported testbed topology if it's a new test case?

N/A

Documentation

N/A

  Some platforms do not support TAM (Telemetry and Monitoring)
  ST (Stream Telemetry) Stats capabilities. When the function
  sai_query_stats_st_capability is called on these platforms,
  it returns SAI_STATUS_NOT_SUPPORTED (error -2).

  This error is expected behavior on platforms without TAM ST
  support and should not cause test failures. This patch adds
  the error to the loganalyzer ignore list to prevent false
  test failures.

Signed-off-by: Pratik Dam <[email protected]>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@pdam-arista pdam-arista reopened this Mar 19, 2026
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@StormLiangMS
Copy link
Copy Markdown
Collaborator

Code Review

LGTM — Correct addition to the loganalyzer ignore list for expected SAI_STATUS_NOT_SUPPORTED (-2) on platforms without TAM ST Stats capabilities. Good before/after test evidence (pfcwd errors resolved).

Minor suggestion: Add a comment with the issue URL above the new entry for traceability:

# https://github.com/sonic-net/sonic-mgmt/issues/22893
r, ".* ERR syncd#syncd: \[none\] SAI_API_SWITCH:sai_query_stats_st_capability:\d+ Get TAM ST Stats capabilities failed with error -2.*"

Copy link
Copy Markdown
Collaborator

@StormLiangMS StormLiangMS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@StormLiangMS StormLiangMS merged commit 432bf17 into sonic-net:master Mar 19, 2026
24 checks passed
@StormLiangMS StormLiangMS added Request for 202511 branch Request to backport a change to 202511 branch Approved for 202511 branch labels Mar 19, 2026
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Mar 19, 2026
Some platforms do not support TAM (Telemetry and Monitoring)
  ST (Stream Telemetry) Stats capabilities. When the function
  sai_query_stats_st_capability is called on these platforms,
  it returns SAI_STATUS_NOT_SUPPORTED (error -2).

  This error is expected behavior on platforms without TAM ST
  support and should not cause test failures. This patch adds
  the error to the loganalyzer ignore list to prevent false
  test failures.

Signed-off-by: Pratik Dam <[email protected]>
Signed-off-by: mssonicbld <[email protected]>
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202511: #23140

mssonicbld pushed a commit that referenced this pull request Mar 19, 2026
Some platforms do not support TAM (Telemetry and Monitoring)
  ST (Stream Telemetry) Stats capabilities. When the function
  sai_query_stats_st_capability is called on these platforms,
  it returns SAI_STATUS_NOT_SUPPORTED (error -2).

  This error is expected behavior on platforms without TAM ST
  support and should not cause test failures. This patch adds
  the error to the loganalyzer ignore list to prevent false
  test failures.

Signed-off-by: Pratik Dam <[email protected]>
Signed-off-by: mssonicbld <[email protected]>
vrajeshe pushed a commit to vrajeshe/sonic-mgmt that referenced this pull request Mar 23, 2026
Some platforms do not support TAM (Telemetry and Monitoring)
  ST (Stream Telemetry) Stats capabilities. When the function
  sai_query_stats_st_capability is called on these platforms,
  it returns SAI_STATUS_NOT_SUPPORTED (error -2).

  This error is expected behavior on platforms without TAM ST
  support and should not cause test failures. This patch adds
  the error to the loganalyzer ignore list to prevent false
  test failures.

Signed-off-by: Pratik Dam <[email protected]>
Signed-off-by: Venkata Gouri Rajesh Etla <[email protected]>
ravaliyel pushed a commit to ravaliyel/sonic-mgmt that referenced this pull request Mar 27, 2026
Some platforms do not support TAM (Telemetry and Monitoring)
  ST (Stream Telemetry) Stats capabilities. When the function
  sai_query_stats_st_capability is called on these platforms,
  it returns SAI_STATUS_NOT_SUPPORTED (error -2).

  This error is expected behavior on platforms without TAM ST
  support and should not cause test failures. This patch adds
  the error to the loganalyzer ignore list to prevent false
  test failures.

Signed-off-by: Pratik Dam <[email protected]>
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.

Bug:[loganalyzer] Test failures due to TAM ST Stats capability errors on unsupported platforms

3 participants