-
Notifications
You must be signed in to change notification settings - Fork 39k
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
apiserver: command exec in pod randomly drops stdin #112834
Comments
It turned out to be unreliable (see kubernetes#112834). Encoding the data inside the command as input for base64 is a workaround that is fine for small amounts of data. It becomes less efficient and/or unusable for large amounts.
/sig testing |
maybe something breaking the spdy encapsulation? |
Yes, could be anywhere. Probably a good first step would be to write a stress test for this functionality. |
yeah, it suffered of memory leaks in the past, I don't think that this feature has been stress tested |
It turned out to be unreliable (see kubernetes#112834). Encoding the data inside the command as input for base64 is a workaround that is fine for small amounts of data. It becomes less efficient and/or unusable for large amounts.
It turned out to be unreliable (see kubernetes#112834). Encoding the data inside the command as input for base64 is a workaround that is fine for small amounts of data. It becomes less efficient and/or unusable for large amounts.
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/sig apimachinery This is used by test/e2e/framework, but ultimately this is caused somewhere else. /remove-lifecycle stale |
@pohly: The label(s) In 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. |
/sig api-machinery |
We are at api machinery bugscrub meeting. |
I have asked a colleague to write a stress test for this. He won't be able to solve it, but it should be a start towards identifying the root cause. /cc @hj-johannes-lee |
the tests in |
/cc @hj-johannes-lee @pohly |
@cici37 Hi, I am working on it, but could not reproduce the exact problem.! We were supposed to have a meeting and discuss this matter, but we couldn't.
Let me discuss with @pohly asap and come with the "working" stress test.! |
/triage accepted |
We in the fabric8 java client are seeing similar problems fabric8io/kubernetes-client#4910 with exec stdin across a variety of our supported http clients. We're also seeing a problem the other direction on stdOut. Occasionally we'll see the web socket close being sent to before all of the stdOut data messages have been received. We are considering a workaround of waiting for the exit code message, but it is definitely not expected behavior to see additional messages after close. |
websocket has a known issue #89899 (comment) and is reliable than the spdy implementation |
@aojea that known issue is fairly easy to workaround, at least for our internal usage scenarios. When you are done with stdIn, you send the web socket close. As noted in that issue it's not a great solution because you won't reliably see command completion - but the api server should process everything that was sent. Isn't SPDY deprecated? The problem identified here is that the apiserver websocket seems to be the handling close out of order - when sending data it will process the incoming close prior to fully processing data messages it has already received, and on the send side it will send the close ahead of pending data messages. |
but is the one used by kubectl exec/portforward 😄 There was one person trying to move on to websockets by default but it seems that is hard to keep the compatibility between versions #60140 (comment) and the ROI doesn't seem to be enough to try such complicated change
the close before the data is sent is similar to this #60140 (comment), but I'm just doing some quick correlations here , you should verify and double check those links |
My apologies. After reviewing these issues and the relevant net, apiserver, and kubernetes code, the issues that we are hitting are definitely within the fabric8 kubernetes client code. I'll get those addressed and see how often, if at all, we're actually hitting this or #60140 |
This issue has not been updated in over 1 year, and should be re-triaged. You can:
For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/ /remove-triage accepted |
/triage accepted |
Hello, Not sure it's the same issue. I don't succeed to use
But running:
And typing something with Also this works:
|
What happened?
I was using
kubernetes/test/e2e/framework/exec_util.go
Lines 49 to 84 in 725993a
kubectl exec -i
) withdd
as command and some data as stdin to create a file inside a container. This worked fine most of the time during local development. When used inside a Prow job, I ran into test flakes that could be traced down todd
returning after writing zero bytes although stdin was non-empty. No error was returned.What did you expect to happen?
The data should be transferred reliably.
How can we reproduce it (as minimally and precisely as possible)?
Sorry, no test for this right now.
Anything else we need to know?
No response
Kubernetes version
462f412 (roughly current master)
Cloud provider
OS version
No response
Install tools
kind
Container runtime (CRI) and version (if applicable)
containerd (from master)
Related plugins (CNI, CSI, ...) and versions (if applicable)
No response
The text was updated successfully, but these errors were encountered: