kubernetes / kubernetes/kubectl
kubectl cp will return a error "Dropping out copy after 0 retries error: unexpected EOF"
- Dominant language
- Go
- Stars
- 3.3k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
**What happened**:
➜ ~ kubectl cp openapi-test/centos-pod:home/log ./test
Dropping out copy after 0 retries
error: unexpected EOF
➜ ~ kubectl cp openapi-test/centos-pod:home/log ./test
Dropping out copy after 0 retries
error: unexpected EOF
➜ ~ kubectl cp openapi-test/centos-pod:home/log ./test
Dropping out copy after 0 retries
error: unexpected EOF
➜ ~ kubectl cp openapi-test/centos-pod:home/log ./test
Dropping out copy after 0 retries
error: unexpected EOF
➜ ~ kubectl cp openapi-test/centos-pod:home/log ./test
Dropping out copy after 0 retries
error: unexpected EOF
➜ ~ kubectl cp openapi-test/centos-pod:home/log ./test
➜ ~ kubectl cp openapi-test/centos-pod:home/log ./test
Dropping out copy after 0 retries
error: unexpected EOF
➜ ~ kubectl cp openapi-test/centos-pod:home/log ./test
➜ ~ kubectl cp openapi-test/centos-pod:home/log ./test
Dropping out copy after 0 retries
error: unexpected EOF
➜ ~ kubectl cp openapi-test/centos-pod:home/log ./test
Dropping out copy after 0 retries
error: unexpected EOF
only two successful attempts
It cannot be executed successfully 100%
**What you expected to happen**:
I hope the kubectl cp copy directory can execute normally
**Environment**:
➜ ~ kubectl version
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short. Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.3", GitCommit:"aef86a93758dc3cb2c658dd9657ab4ad4afc21cb", GitTreeState:"clean", BuildDate:"2022-07-13T14:21:56Z", GoVersion:"go1.18.4", Compiler:"gc", Platform:"darwin/arm64"}
Kustomize Version: v4.5.4
Server Version: version.Info{Major:"1", Minor:"22+", GitVersion:"v1.22.10-aliyun.1", GitCommit:"2e6f009b4878915cb2f420c77b0bb5c50ffa6141", GitTreeState:"clean", BuildDate:"2023-04-24T04:42:55Z", GoVersion:"go1.16.15", Compiler:"gc", Platform:"linux/amd64"}
WARNING: version difference between client (1.24) and server (1.22) exceeds the supported minor version skew of +/-1
Contributor guide
Research direction
Start by reproducing the kubectl cp directory transfer using the reported client and server versions, then trace the kubectl cp entry point around the unexpected EOF and retry message. Done means the directory copies reliably without dropping out or returning unexpected EOF; the issue does not name a source file or test to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100