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

Node mount paths exceed the 128 character limit #350

Open
erikh opened this issue Feb 21, 2019 · 7 comments
Open

Node mount paths exceed the 128 character limit #350

erikh opened this issue Feb 21, 2019 · 7 comments
Milestone

Comments

@erikh
Copy link

erikh commented Feb 21, 2019

If the mount path during an attach exceeds 128 bytes, protobuf complains.

Since MAXPATHLEN is ... 1024 or something like that on linux, doesn't this seem a little short? We're shipping a UUID with our dynamically provisioned volumes. The k8s mountpath on our system is already over 90 bytes.

Any advice is welcome, thanks.

@jdef
Copy link
Member

jdef commented Feb 21, 2019

... protobuf complains.

Do you mean the CO or plugin is complaining (because they're actually validating the protobuf fields according to the CSI spec, as they should be)?

The spec defines a 128 byte limit for string fields, unless otherwise noted. It sounds like we should increase the limit for paths since they'll probably get quite longer than 128 in some cases.

@erikh
Copy link
Author

erikh commented Feb 21, 2019 via email

@erikh
Copy link
Author

erikh commented Feb 22, 2019

Sorry for the late reply.

Here's the output coming back from kubectl describe:

  Warning  FailedMount  0s (x4 over 4s)  kubelet, appserv17  MountVolume.SetUp failed for volume "pvc-d41134f1-310b-11e9-a2ef-54ab3a2919d1" : rpc error: code = InvalidArgument desc = exceeds size limit: TargetPath: max=128, size=131

Please note that we are using https://github.com/rexray/gocsi for a framework, and while I cannot find where the final bits of the path are being set in the pipeline (we're using the volume ID), I think it's related to this library at least a little. I am still digging through it. If something in the k8s 1.13 pipe is not validating the length of the strings, this must be it.

Having some trouble finding the full attacher log info, but basically, this is my base path:

/var/lib/kubelet/pods/ed16ce55-310b-11e9-a2ef-54ab3a2919d1/volumes/

and then add another 60-70 bytes for a suffix on top of that for the actual volume dir (csi-%s) that I think gocsi is generating.

@jdef
Copy link
Member

jdef commented Feb 22, 2019 via email

@saad-ali
Copy link
Member

Agreed 128 bytes is too small for target_path fields. I've heard the same complaint from others. Kubernetes doesn't enforce the limit, so it's not a huge deal. But we should loosen the spec here to permit standard Linux (and Windows) paths.

@saad-ali saad-ali added this to the v1.2 milestone Mar 6, 2019
@jdef jdef modified the milestones: v1.2, v1.3 Feb 24, 2020
@jdef
Copy link
Member

jdef commented Feb 24, 2020

A quick Google search suggests that 4k is the length limit for common Linux filesystems. I guess Windows systems used to have a 255? 260? limit, but apparently that's overridable in Windows 10 - but I don't see what the new max length is in W10.

Suggest 4k as the limit for paths now.

@Jiawei0227
Copy link
Contributor

Jiawei0227 commented Feb 4, 2021

The change for length limitation has been merged with the new CSI spec. Please check with rexray/gocsi maintainer to see if they need to make any change on their side. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants