Skip to content
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

fixes: use multiple sync messages if we hit ttrpc max message limit. #111

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

klihub
Copy link
Member

@klihub klihub commented Sep 26, 2024

This PR updates the protocol to allow initial plugin sync to use multiple messages. This is necessary if we hit the maximum ttrpc message size limit. That in turn can happen, as the maximum limit for total annotation key
and values in K8s is 256k. The adaptation implementation is updated to fall back to multiple messages if necessary. The stub implementation is updated to transparently collect and recombine multipart sync messages into a single one before passing it up the stack to the plugin.

@klihub klihub force-pushed the devel/split-sync-messages branch 4 times, most recently from 13498d6 to 4d42d7c Compare September 27, 2024 11:08
@klihub klihub marked this pull request as ready for review September 27, 2024 11:11
@klihub klihub marked this pull request as draft September 27, 2024 11:16
Add a mechanism to block and unblock plugin synchronization.
We use this first in our tests to ensure that test plugins
get properly synchronized either before or after we create
a pod or a container, but not halfway through it.

We should also do the same in the corresponding paths of the
NRI runtime integration core where otherwise processing NRI
events concurrent to plugin registration could result in an
inconsistent initial state of a new plugin (missing pods or
containers during sync, or omitted event for the plugin).

Signed-off-by: Krisztian Litkey <[email protected]>
Block plugin sync/registration in mocked test suite runtime.

Signed-off-by: Krisztian Litkey <[email protected]>
Don't ignore ginkgo test run exit status.

Signed-off-by: Krisztian Litkey <[email protected]>
Update ttrpc to get sender-side reject of oversized messages.
Although purely a cosmetic change, update sample plugins' NRI
dependecy to our latest tag.

Signed-off-by: Krisztian Litkey <[email protected]>
Don't reject oversized messages. Split and transmit them
in multiple chunks.

Signed-off-by: Krisztian Litkey <[email protected]>
Try using multiple messages if we hit maximum ttrpc payload
limit for initial plugin synchronization.

Signed-off-by: Krisztian Litkey <[email protected]>
Handle split sync messages in the stub, opaque to the client.

Signed-off-by: Krisztian Litkey <[email protected]>
@klihub klihub marked this pull request as ready for review September 29, 2024 13:12
Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants