[202512][syslog]: Wait for rate-limit notification forwarding - #1382
Merged
bingwang-ms merged 1 commit intoAug 27, 2026
Merged
Conversation
The presence analyzer can race asynchronous notification forwarding because the existing poll waits only for generated messages. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9ec7c542-26cb-4b5c-a5f4-4114276da6d3 (cherry picked from commit 4a8152ed479e1982a0f150273b538f055be94220) Signed-off-by: Deeksha Rao <deerao@microsoft.com> # Conflicts: # tests/syslog/test_syslog_rate_limit.py
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
12 tasks
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.
Description of PR
Summary:
Backport sonic-net/sonic-mgmt#27402 to replace the fixed forwarding delay in
the
202512syslog rate-limit test with a marker-scoped wait for therate-limit notification.
Reference: sonic-net/sonic-mgmt#27402
Type of change
Back port request
Tested branch
Test result
SONiC.20251210.12-tests/syslog/test_syslog_rate_limit.py::test_syslog_rate_limitpassed onvms13-lt2-nh4210-1(lt2-u32d128):1 passed in 412.59s.Approach
What is the motivation for this PR?
The log generator runs inside a container, and rsyslog forwards its
rate-limit notification to the host asynchronously. The existing fixed
five-second delay can expire before the notification arrives, causing the
presence analyzer to report
expected_missing_match: 1even though ratelimiting worked.
How did you do it?
Replaced the fixed delay with a bounded poll of the marker-scoped host
syslog. The analyzer window remains open until every configured presence
pattern arrives or the existing 120-second forwarding timeout expires.
The cherry-pick conflict was resolved by retaining the
202512analyzerstructure and adapting the polling behavior from sonic-net/sonic-mgmt#27402
to its existing
presence_log_regexflow.How did you verify/test it?
internal-202512,SONiC.20251210.12:tests/syslog/test_syslog_rate_limit.py::test_syslog_rate_limitpassed onvms13-lt2-nh4210-1(1 passed in 412.59s).python3 -m py_compile tests/syslog/test_syslog_rate_limit.pyflake8 --max-line-length=120 tests/syslog/test_syslog_rate_limit.pygit diff --checkAny platform specific information?
Observed on an NH-4210 testbed under elevated log load, but the asynchronous
forwarding race is platform-independent.
Supported testbed topology if it's a new test case?
Not applicable.
Documentation
Not applicable.