nanovms / ops

ops - build and run nanos unikernels
https://ops.city
MIT License
1.27k stars 132 forks source link

chore(volumes): warn when volume name/label length > nanos(VOLUME_LABEL_MAX_LEN - 1) #1517

Closed rinor closed 10 months ago

rinor commented 1 year ago

https://github.com/nanovms/nanos/blob/41c61e23db0d358383fdc8c95b1c046eceb4d147/src/runtime/storage.h#L23

#define VOLUME_LABEL_MAX_LEN    32  /* null-terminated string */

when the name/label length > 31 the kernel won't load/mount it.

eyberg commented 1 year ago

i'm fine w/a warning, although curious as to the use-case as to why more than 31 is needed

i took a look and GCP limit is 61 and AWS is 255 (for aws this is prob. the tag limit)

rinor commented 1 year ago

although curious as to the use-case as to why more than 31 is needed

There is no need for that, but when you don't know that limit (or you forget about it, like I did) you may end up wasting a lot of time troubleshooting why the volume is not being mounted when the name is longer than that, for no specific reason other than being descriptive as much as possible.

rinor commented 10 months ago

closing this since nanos warns about this upon volume detection and that's good enough