-
Notifications
You must be signed in to change notification settings - Fork 17
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
Modify lease keep alive call to be compatible with grpc proxy #117
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #117 +/- ##
==========================================
+ Coverage 98.35% 98.38% +0.02%
==========================================
Files 24 24
Lines 1521 1545 +24
==========================================
+ Hits 1496 1520 +24
Misses 25 25
Continue to review full report at Codecov.
|
What version of Etcd are you using out of curiosity? |
We've tested against 3.2 and 3.3.3 as well as master, also with the latest gRPC gem. |
Good deal, I was able to reproduce the issue and am looking to work with the CoreOS guys to get this resolved upstream. If this issue is blocking you guys, I'm happy to get this merged and work to rip it out once it's fixed. Although, I don't feel great about adding gRPC Proxy logic/specs into this project. I'd rather remain agnostic with regard to users topology/proxy choices. That being the case, I'd ask that you remove any specs/code that relates to the gRPC Proxy, and just add a comment to your workaround. Does that make sense? |
We can just run our fork so no big rush. We can dump the proxy specific bits you mentioned for this. It's a particularly odd and unexpected interaction. |
Right on, I appreciate the help! |
6bf5ec7
to
1887cb0
Compare
We'll need to update this shortly because of a bug in the way it is structured. When code makes a bidi call, the write operation is run inside a thread - that means that if this call gets a |
@jcalvert Hey man, mind updating the parent etcd issue with your findings? |
I think the etcd issue is still the same - this is an additional issue with error handling of bidi calls. |
1887cb0
to
c780849
Compare
c780849
to
8335bc7
Compare
Updated again...looks like some of our forked stuff leaked over, so I cleaned that up. |
While attempting utilize the
lease_keep_alive_once
method, we discovered an incompatibility when connecting to an etcd gRPC proxy. All requests would fail with a Cancelled status like:After some extensive debugging the culprit seems to be the EOF check the proxy makes here: - when the "request" object for the bidirectional stream has completed writing, this code point is reached and the receiving loop server side returns which then fires off a message to the
stop
channel - and so the context is marked as cancelled before the request even runs. For reference, we tried using the Go client against the etcd proxy and did not encounter this issue.Looking at the comments here and here it indicates the issue in this case is one of needing to defer signaling that writing is complete until the code has actually received a response. Doing this allows requests that are proxied via gRPC to succeed as expected.