-
Notifications
You must be signed in to change notification settings - Fork 372
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
Change size limitation for all file paths and node_id #464
Conversation
Discussed this at community meeting. See notes here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the new limit for node id 253 instead of 256? Something k8s specific?
Otherwise I'm fine w/ Saad's suggestions.
…On Fri, Jan 8, 2021 at 4:46 PM Saad Ali ***@***.***> wrote:
***@***.**** commented on this pull request.
@jdef <https://github.com/jdef> @jieyu <https://github.com/jieyu> PTAL
Also let's get input from @gnufied <https://github.com/gnufied> @jsafrane
<https://github.com/jsafrane> - Per Hemant, even existing 128 length
limit for paths may be a problem for systemd.
------------------------------
In spec.md
<#464 (comment)>
:
> @@ -2073,6 +2075,7 @@ message NodeStageVolumeRequest {
// CO SHALL be responsible for creating the directory if it does not
// exist.
// This is a REQUIRED field.
+ // The size limitation for this field is 256 bytes.
⬇️ Suggested change
- // The size limitation for this field is 256 bytes.
+ // This field overrides the general CSI size limit.
+ // The size of this field SHALL NOT exceed 256 bytes.
+ // The general CSI size limit, 128 byte, is RECOMMENDED for best backwards compatibility.
Do the same for similar comments below.
------------------------------
In spec.md
<#464 (comment)>
:
> @@ -436,6 +436,8 @@ These limits apply for messages generated by both COs and plugins.
| 128 bytes | string |
| 4 KiB | map<string, string> |
+Please note that for any length of paths or id, 128 bytes will still be the preferrable size for backward compatibility.
Remove this and just include it in each override as specified below.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#464 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAR5KLFPEVXUYP7KA7FH7N3SY54J5ANCNFSM4TRMNXTA>
.
--
James DeFelice
585.241.9488 (voice)
650.649.6071 (fax)
|
Yep, k8s object name length limit is 253 and these id's end up being used there. |
csi.proto
Outdated
// This field overrides the general CSI size limit. | ||
// The size of this field SHALL NOT exceed 256 bytes. The general | ||
// CSI size limit, 128 byte, is RECOMMENDED for best backwards | ||
// compatibility. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was checking the systemd issue again and 256 indeed is too big to be a unit name for mount point to be managed by systemd. More details are here - https://github.com/systemd/systemd/pull/15911/files#diff-cba2cdf3ac7ac3975d69ed999252a138fed94763e46312c7e48500744eb8028aR452 . The issue itself is discussed in more detail - systemd/systemd#14294
The underlying reasoning is - on Linux FILENAME_MAX
is 256 chars and hence you can't make a file whose name is bigger than 256 character. Now each mount point typically when managed via systemd gets converted to a unit name. This conversion happens on whole path and hence if it is bigger than 256 chars, systemd fails to manage it.
It should also be noted that, there is another variable called PATH_MAX
which defines the maximum length of whole path (i.e not just the last component) and according to https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation the value is 260 characters on windows and hence setting this to 256 char will be pushing it awfully close to the upper limit.
So I think that 256 char might actually be too close to the upper limit of maximum path lengths and we might have to reduce the length. I don't know what good default will be but something smaller I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, what about 192? Seems like a magic number to use
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am putting 192 as the reduced length for both node_id and path. So it could be less error-prone.
We can talk more in the next CSI meeting to confirm this tho.
8889c3f
to
826e27d
Compare
Changed as per discussion in the CSI community meeting Notes:
|
- Not put limit on paths length limiation. But add a minial support length floor. - Change node_id length limitation to 192 bytes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
lgtm too! |
@jdef Hey James, would you mind take another look at this? |
lgtm |
Merging |
LGTM, thanks all! |
Size limitation default for CSI spec is 128 bytes.
This has been brought up several times in different issues[1][2] that we should increase the limitation.
I think there are two types of length now need to increase:
In this PR, suggest to increase node_id length limitation to 192 bytes.
For all other paths related field, remove the limitation of 128 and instead put a minimal support size of 128 bytes
[1] #350
[2] kubernetes-sigs/gcp-compute-persistent-disk-csi-driver#581