-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Upload InputStream To Pod with java.io.InterruptedIOException: interrupted (6.0.0-RC1) #4249
Comments
@neuropaddy I haven't reproduced this yet. From what I can see, this exception is just being logged - it's not causing the upload to fail, is that correct? This looks like a timing issue with websocket resources not being fully closed by the time the client is closing. However the ExecWatch should have already been closed at that point. |
Yes, the upload operation is success and the content can be written to the pod. |
I could not reproduce this (jbang + minikube). |
@sunix we probably just need to filter this - check if the exitCode future is done, if it is then there's no need to call the listener method or log. |
Describe the bug
An unexpected ERROR InterruptedIOException occurred while using 'upload' API in kubernetesClient 6.0.0-RC1, but, this exception does not occur in v5.12.2.
Fabric8 Kubernetes Client version
6.0.0-RC1
Steps to reproduce
try (KubernetesClient client = new KubernetesClientBuilder().build()) {
client.pods().inNamespace(nameSpace) // <- Namespace of Pod
.withName(podName) // <- Name of Pod
.file(podFileLocation) // <- Target location of copied file inside Pod
.upload(new ByteArrayInputStream(content.getBytes()));
}
try (KubernetesClient client = new DefaultKubernetesClient()) {
client.pods().inNamespace(nameSpace) // <- Namespace of Pod
.withName(podName) // <- Name of Pod
.file(podFileLocation) // <- Target location of copied file inside Pod
.upload(new ByteArrayInputStream(content.getBytes()));
}
Expected behavior
Suppose the ERROR InterruptedIOException does not occurred in v.6.0.0-RC1.
Runtime
minikube
Kubernetes API Server version
other (please specify in additional context)
Environment
Linux
Fabric8 Kubernetes Client Logs
Additional context
API server version: k8s.gcr.io/kube-apiserver:v1.23.3
The text was updated successfully, but these errors were encountered: