Skip to content
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

cpFromPod / cpToPod is missing --retries flag #1407

Open
fpm-peter opened this issue Nov 9, 2023 · 2 comments
Open

cpFromPod / cpToPod is missing --retries flag #1407

fpm-peter opened this issue Nov 9, 2023 · 2 comments
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.

Comments

@fpm-peter
Copy link

Describe the bug
cpFromPod / cpToPod silently fail on larger files, resulting in incomplete files.

** Client Version **
0.20.0

** Server Version **
1.25.7+rke2r1

To Reproduce
upload a larger file, at least 200MB. The kubernetes issue has gone into detail about network settings a.s.o.

Expected behavior
cpFromPod / cpToPod should try to upload the whole file or error out on premature disconnect.

Environment (please complete the following information):

  • OS: Linux
  • NodeJS Version 20

Additional context
Has been identified and 'fixed' in kubectl cp kubernetes/kubernetes#60140 with the --retries flag.

@brendandburns
Copy link
Contributor

the logic in kubectl is pretty complicated. Someone will need to port that logic into the copy logic in this client.

@brendandburns brendandburns added the good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. label Nov 10, 2023
@Knickkennedy
Copy link

I noticed that in kubectl cp that it looks like the tar.Read just uses a byte stream to capture where it left off and continue. Could that logic be replicated here? Basically just create an io pipe and keep track of where we are in the bytes? Also sorry if this is out of left field, I'm new to contributing to Kubernetes in any capacity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.
Projects
None yet
Development

No branches or pull requests

3 participants