-
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
Corrupted TAR archive using PodResource.copy #4234
Comments
@tchiotludo : Do you face this error only in 6.0.0-RC1 or in earlier versions as well? |
Earlier also, I've seen that there is update on the main branch about that, so I decided to postpone the issue with the last version. |
@tchiotludo @rohanKanojia there appears to be some problem with ustar support in the apache commons library. The trailing entry padding is not being discarded, but instead is being read as part of the next entry's header - which is then seen as an invalid entry. If you switch to a posix tar format, then everything works fine through the commons library - but trying that in the integration test I see that the version of tar with busybox doesn't support a format option. I'm not sure if can then count on that generally. |
Narrowing in a bit more. The problem seems to be introduced via the base64 encoding / decoding. The apache library works fine against a fileinputstream of the tar contents. The issue is that the Base64.InputStream skip method will directly skip bytes in the underlying stream - it needs to skip decoded bytes instead. |
Describe the bug
While copying file from a pod, I received a
Corrupted TAR archive.
exception withInvalid byte 3 at offset 0
Fabric8 Kubernetes Client version
6.0.0-RC1
Steps to reproduce
Expected behavior
The copy should be successful.
Runtime
other (please specify in additional context)
Kubernetes API Server version
other (please specify in additional context)
Environment
Linux
Fabric8 Kubernetes Client Logs
Additional context
The text was updated successfully, but these errors were encountered: