-
Notifications
You must be signed in to change notification settings - Fork 216
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
blobfuse2 on AKS 1.25.5 does not support files with Content-Encoding: gzip
#1100
Comments
As the content encoding is set to 'gzip' the SDK dependency that we have is trying to validate that file has valid 'gzip' headers. If it does not match then it will throw an error. As the file is 'csv' and 'gzip' encoding is set in type its failing. Either you can skip setting this type or use the 'x-gzip' as you have suggested. |
@vibhansa-msft The file is a valid gzip. The only "invalid" thing was the extension (it should have been .csv.gz instead of .csv), but I've reproduced it with a .gz-extensioned file too. What does the underlying SDK use to determine that a file is valid gzip? Per the RFC that should just be the first two bytes
FWIW it's also somewhat size-dependent. |
We are looking at this and there is some misunderstanding here. |
There's no requirement for using the Content-Encoding, it just caught us off guard. One of our teams had created the gzipped files with Content-Encoding of We've since switched to using Content-Type of |
Thanks for clarifying this. We had a debug session yesterday to dig deep into this. By default Accept-Encoding is set to 'true' in HTTP requests that Blobfuse sends. This means if server has done any transport layer compression SDK will decompress and deliver the data back to application. In this case server is not doing any transport layer compression, however as the content-encoding is set on blob, server is forwarding the same in REST response. SDK assumes server has done compression and tries to decompress the data. As compression was not done at transport layer, the content-length that we get for the blob is size of zipped file (x-ms-content-length) and we try to read only that much data from SDK. As SDK went to decompress it, resultant data is of much larger size and this creates a problem in reading and we assume there is some corruption in data. |
Which version of blobfuse was used?
blobfuse2 version 2.0.1
Which OS distribution and version are you using?
AKS 1.25.5 running
AKSUbuntu-2204gen2containerd-2023.02.15
node imageIf relevant, please share your mount command.
blobfuse2 mount /var/lib/kubelet/plugins/kubernetes.io/csi/blob.csi.azure.com/40774c1cc34ceb8f8428e46f2de90f65dcd5f007fd997f8fc8e2f8c8ff924f60/globalmount --file-cache-timeout-in-seconds=120 -o negative_timeout=120 --use-attr-cache=true --virtual-directory=true --cache-size-mb=1000 -o allow_other --log-level=LOG_WARNING -o attr_timeout=120 -o entry_timeout=120 --pre-mount-validate=true --use-https=true --cancel-list-on-mount-seconds=10 --empty-dir-check=false --tmp-path= --container-name= --ignore-open-flags=true
What was the issue encountered?
blobfuse2 seems to be confused by files which have a Content-Encoding of
![image](https://user-images.githubusercontent.com/1400408/228942324-dcabb2aa-89ab-4495-bc46-3ca50c8f4e1d.png)
gzip
.The files show up in the directory just fine, but any attempt to copy or move them results in an IO error:
![image](https://user-images.githubusercontent.com/1400408/228943063-f674f4ba-b52a-4b5e-88de-ccb3a42aac93.png)
This only impacts blobfuse-mounted directories. The file was downloadable from Azure using Storage Explorer and perfectly valid.
Have you found a mitigation/solution?
Removing or changing Content-Encoding seems to fix the behavior. No value other than
gzip
seems to trigger this issue - we trieddeflate
andutf-8
andbase64
and evenasdf
. We ended up setting the Content-Type toapplication/x-gzip
which is what Azure Storage Explorer sets it to when uploading a gzip file, and not setting Content-Encoding at all.Please share logs if available.
Can't find any corresponding to the IO error.
/var/log/blobfuse2
is clear (except not being able to find the du command, which is a known issue on AKS) and there's nothing related to IO indmesg
The text was updated successfully, but these errors were encountered: