Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

client.go: HybridVSockDialer: Change Read EOT to recv peek #696

Merged
merged 1 commit into from
Nov 29, 2019

Conversation

teawater
Copy link
Member

Rust agent(grpc-rs) cannot work with firecacker because the first package
will be dropped or truncated by HybridVSockDialer read EOT code.
This issue was reported in
kata-containers/kata-containers#79

Golang agent(grpc-golang) is also affected by this issue. But it is first
package is 9 bytes FRAME_SETTINGS. Drop it will not affect subsequent
communications.

This commit change to use recv peek that will do same check with read
EOT but not drop any package.

Fixes: #695

Signed-off-by: Hui Zhu [email protected]

@codecov
Copy link

codecov bot commented Nov 28, 2019

Codecov Report

Merging #696 into master will decrease coverage by 0.06%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master     #696      +/-   ##
==========================================
- Coverage   60.57%   60.51%   -0.07%     
==========================================
  Files          17       17              
  Lines        2534     2540       +6     
==========================================
+ Hits         1535     1537       +2     
- Misses        850      855       +5     
+ Partials      149      148       -1

@teawater
Copy link
Member Author

/test

Copy link
Contributor

@jodh-intel jodh-intel left a comment

Choose a reason for hiding this comment

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

Good catch @teawater !!

lgtm

// Just close the connection, gRPC will dial again
// without errors
conn.Close()
// Receive the package from the connection without remove this
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: s/package/packet/.

Just an idea but you could simplify this comment to something like:

Receive the packet from the connection without removing it from the receive queue (MSG_PEEK), ensuring the connection is usable.

Copy link
Member Author

Choose a reason for hiding this comment

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

@jodh-intel Thanks! Pushed a new version according to your comments.

Rust agent(grpc-rs) cannot work with firecacker because the first package
will be dropped or truncated by HybridVSockDialer read EOT code.
This issue was reported in
kata-containers/kata-containers#79

Golang agent(grpc-golang) is also affected by this issue.  But it is first
package is 9 bytes FRAME_SETTINGS.  Drop it will not affect subsequent
communications.

This commit change to use recv peek that will do same check with read
EOT but not drop any package.

Fixes: kata-containers#695

Signed-off-by: Hui Zhu <[email protected]>
@teawater
Copy link
Member Author

/test

@jodh-intel
Copy link
Contributor

Thanks again @teawater.

Ping @kata-containers/agent.

Copy link

@devimc devimc left a comment

Choose a reason for hiding this comment

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

good catch @teawater !

@devimc
Copy link

devimc commented Nov 28, 2019

restarting firecracker CI

@lifupan lifupan merged commit 11d5c33 into kata-containers:master Nov 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rust agent(grpc-rs) cannot work with firecacker hybrid vsock
4 participants