-
Notifications
You must be signed in to change notification settings - Fork 276
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
Account for control character as part of zmq_read_part #906
Merged
zbud-msft
merged 4 commits into
sonic-net:master
from
zbud-msft:account_for_control_character
Aug 29, 2024
Merged
Account for control character as part of zmq_read_part #906
zbud-msft
merged 4 commits into
sonic-net:master
from
zbud-msft:account_for_control_character
Aug 29, 2024
Conversation
This file contains 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
11 tasks
liuh-80
reviewed
Aug 28, 2024
liuh-80
approved these changes
Aug 29, 2024
@StormLiangMS Can you please review for 202311? |
mssonicbld
pushed a commit
to mssonicbld/sonic-swss-common
that referenced
this pull request
Sep 4, 2024
mssonicbld
pushed a commit
to mssonicbld/sonic-swss-common
that referenced
this pull request
Sep 4, 2024
This was referenced Sep 4, 2024
Cherry-pick PR to 202311: #910 |
Cherry-pick PR to 202405: #911 |
yxieca
pushed a commit
that referenced
this pull request
Sep 10, 2024
Co-authored-by: Zain Budhwani <[email protected]>
@zbud-msft cherry pick PR didn't pass PR checker. Please check!!! Auto cherry pick PR will be closed in 3 days. |
zbud-msft
added a commit
to zbud-msft/sonic-swss-common
that referenced
this pull request
Oct 14, 2024
bingwang-ms
pushed a commit
that referenced
this pull request
Oct 16, 2024
bingwang-ms
added
Included in 202405 Branch
and removed
Approved for 202405 Branch
labels
Nov 6, 2024
11 tasks
qiluo-msft
pushed a commit
to sonic-net/sonic-buildimage
that referenced
this pull request
Dec 24, 2024
Why I did it Fixes #21140 In #20024 and sonic-net/sonic-swss-common#906, we made the change that when a control character is read, zmq_message_read will return with rc 0, which will create an empty internal event. As part of eventd design, empty structured events are dropped, which leads to control characters being a no-op which is the expected behavior. In UT, we are still always expecting a control character to be the first message to be read by zmq which is not the case as described in #20024. We are also not ignoring empty events that are read which is being done by eventd. With this change, control characters are properly ignored if it does after the first test event. How I did it Ignore empty structured events and not expect first zmq_message_read to be control character. How to verify it Manual test/pipeline
mssonicbld
pushed a commit
to mssonicbld/sonic-buildimage
that referenced
this pull request
Dec 24, 2024
Why I did it Fixes sonic-net#21140 In sonic-net#20024 and sonic-net/sonic-swss-common#906, we made the change that when a control character is read, zmq_message_read will return with rc 0, which will create an empty internal event. As part of eventd design, empty structured events are dropped, which leads to control characters being a no-op which is the expected behavior. In UT, we are still always expecting a control character to be the first message to be read by zmq which is not the case as described in sonic-net#20024. We are also not ignoring empty events that are read which is being done by eventd. With this change, control characters are properly ignored if it does after the first test event. How I did it Ignore empty structured events and not expect first zmq_message_read to be control character. How to verify it Manual test/pipeline
mssonicbld
pushed a commit
to sonic-net/sonic-buildimage
that referenced
this pull request
Dec 25, 2024
Why I did it Fixes #21140 In #20024 and sonic-net/sonic-swss-common#906, we made the change that when a control character is read, zmq_message_read will return with rc 0, which will create an empty internal event. As part of eventd design, empty structured events are dropped, which leads to control characters being a no-op which is the expected behavior. In UT, we are still always expecting a control character to be the first message to be read by zmq which is not the case as described in #20024. We are also not ignoring empty events that are read which is being done by eventd. With this change, control characters are properly ignored if it does after the first test event. How I did it Ignore empty structured events and not expect first zmq_message_read to be control character. How to verify it Manual test/pipeline
github-actions bot
pushed a commit
to bradh352/sonic-buildimage
that referenced
this pull request
Jan 2, 2025
Why I did it Fixes sonic-net#21140 In sonic-net#20024 and sonic-net/sonic-swss-common#906, we made the change that when a control character is read, zmq_message_read will return with rc 0, which will create an empty internal event. As part of eventd design, empty structured events are dropped, which leads to control characters being a no-op which is the expected behavior. In UT, we are still always expecting a control character to be the first message to be read by zmq which is not the case as described in sonic-net#20024. We are also not ignoring empty events that are read which is being done by eventd. With this change, control characters are properly ignored if it does after the first test event. How I did it Ignore empty structured events and not expect first zmq_message_read to be control character. How to verify it Manual test/pipeline
github-actions bot
pushed a commit
to bradh352/sonic-buildimage
that referenced
this pull request
Jan 2, 2025
Why I did it Fixes sonic-net#21140 In sonic-net#20024 and sonic-net/sonic-swss-common#906, we made the change that when a control character is read, zmq_message_read will return with rc 0, which will create an empty internal event. As part of eventd design, empty structured events are dropped, which leads to control characters being a no-op which is the expected behavior. In UT, we are still always expecting a control character to be the first message to be read by zmq which is not the case as described in sonic-net#20024. We are also not ignoring empty events that are read which is being done by eventd. With this change, control characters are properly ignored if it does after the first test event. How I did it Ignore empty structured events and not expect first zmq_message_read to be control character. How to verify it Manual test/pipeline
github-actions bot
pushed a commit
to bradh352/sonic-buildimage
that referenced
this pull request
Jan 2, 2025
Why I did it Fixes sonic-net#21140 In sonic-net#20024 and sonic-net/sonic-swss-common#906, we made the change that when a control character is read, zmq_message_read will return with rc 0, which will create an empty internal event. As part of eventd design, empty structured events are dropped, which leads to control characters being a no-op which is the expected behavior. In UT, we are still always expecting a control character to be the first message to be read by zmq which is not the case as described in sonic-net#20024. We are also not ignoring empty events that are read which is being done by eventd. With this change, control characters are properly ignored if it does after the first test event. How I did it Ignore empty structured events and not expect first zmq_message_read to be control character. How to verify it Manual test/pipeline
VladimirKuk
pushed a commit
to Marvell-switching/sonic-buildimage
that referenced
this pull request
Jan 21, 2025
Why I did it Fixes sonic-net#21140 In sonic-net#20024 and sonic-net/sonic-swss-common#906, we made the change that when a control character is read, zmq_message_read will return with rc 0, which will create an empty internal event. As part of eventd design, empty structured events are dropped, which leads to control characters being a no-op which is the expected behavior. In UT, we are still always expecting a control character to be the first message to be read by zmq which is not the case as described in sonic-net#20024. We are also not ignoring empty events that are read which is being done by eventd. With this change, control characters are properly ignored if it does after the first test event. How I did it Ignore empty structured events and not expect first zmq_message_read to be control character. How to verify it Manual test/pipeline
mssonicbld
added a commit
to mssonicbld/sonic-buildimage
that referenced
this pull request
Jan 27, 2025
<!-- Please make sure you've read and understood our contributing guidelines: https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md ** Make sure all your commits include a signature generated with `git commit -s` ** If this is a bug fix, make sure your description includes "fixes #xxxx", or "closes #xxxx" or "resolves #xxxx" Please provide the following information: --> #### Why I did it Fixes sonic-net#21140 In sonic-net#20024 and sonic-net/sonic-swss-common#906, we made the change that when a control character is read, zmq_message_read will return with rc 0, which will create an empty internal event. As part of eventd design, empty structured events are dropped, which leads to control characters being a no-op which is the expected behavior. In UT, we are still always expecting a control character to be the first message to be read by zmq which is not the case as described in sonic-net#20024. We are also not ignoring empty events that are read which is being done by eventd. With this change, control characters are properly ignored if it does after the first test event. ##### Work item tracking - Microsoft ADO **(number only)**:28728116 #### How I did it Ignore empty structured events and not expect first zmq_message_read to be control character. #### How to verify it Manual test/pipeline <!-- If PR needs to be backported, then the PR must be tested against the base branch and the earliest backport release branch and provide tested image version on these two branches. For example, if the PR is requested for master, 202211 and 202012, then the requester needs to provide test results on master and 202012. --> #### Which release branch to backport (provide reason below if selected) <!-- - Note we only backport fixes to a release branch, *not* features! - Please also provide a reason for the backporting below. - e.g. - [x] 202006 --> - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 - [ ] 202111 - [ ] 202205 - [ ] 202211 - [ ] 202305 #### Tested branch (Please provide the tested image version) <!-- - Please provide tested image version - e.g. - [x] 20201231.100 --> - [ ] <!-- image version 1 --> - [ ] <!-- image version 2 --> #### Description for the changelog <!-- Write a short (one line) summary that describes the changes in this pull request for inclusion in the changelog: --> <!-- Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU. --> #### Link to config_db schema for YANG module changes <!-- Provide a link to config_db schema for the table for which YANG model is defined Link should point to correct section on https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md --> #### A picture of a cute animal (not mandatory but encouraged)
11 tasks
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.
ADO: 28728116
Capturing control character in do_capture as part of eventd is difficult as control character can be delayed such that we it is not sometimes caught when initially starting capture service. (SUB -> PUB (part of zmq proxy)).
Instead of dropping the control character as part of eventd do_capture, I will drop it as part of zmq_message_read which eventd calls via events_service.
LIBZMQ: Control character logic: https://github.com/zeromq/libzmq/blob/cbb9925a109152426e4a8a3f8f8eaeddc0516977/src/xsub.cpp#L102
Added UT to confirm, as well as should see success rate of sonic-mgmt testcases go up for telemetry/test_events