-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Add multi-subscriber support to GetContainerEvents CRI API #8916
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
Conversation
|
Hi @surik. Thanks for your PR. I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
3e5c3fd to
32f7ea1
Compare
32f7ea1 to
f200dd5
Compare
|
/retest |
|
@surik: Cannot trigger testing until a trusted user reviews the PR and leaves an DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
1619c3e to
d75372e
Compare
dbe3c5b to
4cfa8bd
Compare
dcantah
left a comment
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.
LGTM assuming CI is happy, I'll check in the morning. Thanks!
4cfa8bd to
227354d
Compare
ruiwen-zhao
left a comment
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.
Just one nit comment on test, otherwise LGTM!
Thanks for working on this!
1eb882b to
37ea59a
Compare
|
/ok-to-test |
|
Would you mind squashing your commits into one? We don't generally need to preserve intermediate commits that are just addressing review comments. |
37ea59a to
0c90d32
Compare
|
/test pull-containerd-node-e2e |
|
All squished. I'm not sure if |
0c90d32 to
815422e
Compare
|
Ok now |
|
Re-running the failed test suite |
|
Hi @samuelkarp this is my first PR to containerd. Is there anything else I have to do to proceed with it? |
|
Just needs another maintainer to review and approve. We generally view two approvals as good to check in. There's exceptions where we'll wait for more folks to get a chance to take a peek if it's a large change, or if we want someone specific to take a look. I think @mikebrow might be interested in this for example. |
815422e to
244f030
Compare
|
I believe the two failed tests just need retry |
henry118
left a comment
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.
LGTM
|
Hey everyone, I wonder if there is something that I have to do to proceed with this PR. |
| } | ||
|
|
||
| func (c *criService) broadcastEvents() { | ||
| for containerEvent := range c.containerEventsChan { |
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.
With this implementation a single slow client will block other clients from receiving updates.
Also each new client slows down delivery since these are being sent sequentially.
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.
@cpuguy83 Thank you for highlighting the concerns. I'm considering wrapping the range function in a goroutine to address the blocking issue. Would it be reasonable to limit the maximum routines running concurrently? If so, what do you think would be a good limit here?
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.
Is there any reason subscribers need to attach to the same event stream over creating new streams for each subscriber?
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.
The subscribers need to receive the same events. We can consider doing a fan out from a different place. For example here
containerd/pkg/cri/server/helpers.go
Line 446 in 7deb68f
| case c.containerEventsChan <- event: |
Is this what you have in mind?
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.
Hey @cpuguy83, following up on our recent discussion about optimizing the event streaming implementation. Would love to get your thoughts on the proposed changes. Thanks!
This commit addresses issue containerd#7318 by introducing events broadcasting to the current implementation. The integration/container_event_test.go is extended to demonstrate the broadcasting capabilities of two simultaneous connected clients. Signed-off-by: Yury Gargay <yury.gargay@gmail.com>
244f030 to
a97e987
Compare
|
I'm closing this one as #9661 has been merged. |
This pull request addresses issue #7318 by introducing events broadcasting to the current implementation.
The
integration/container_event_test.gois extended to demonstrate the broadcasting capabilities of two simultaneous connected clients.