-
Notifications
You must be signed in to change notification settings - Fork 40k
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
can MountPath contain ":" ? #129453
Comments
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
cc @carlory |
this pr may fix #129466 |
I think it is a documentation issue. #31707 removed the limit. Can you update the related comment in the code and then run |
#22204 added the limit but it was removed later. Can you have a look? related comments why it is removed: #31707 (comment) |
I am confused about this issue - why would the mounth path - literally the directory we intend to mount the volume on - contain ":ro" or ":rw" ? If you want to mount it read-only, we have a field for that -- it's not embedded in the string. |
@thockin "a:b" is a vaild path on linux. so I think the |
Agreed. We don't support |
We don't support colons in the path, or we shouldn't, because runtimes like docker do the wrong thing. Have those all been fixed? I do not think special-casing ":ro" makes a lot sense. Runtimes should fix support for colons, or not support them at all. |
/sig node |
cc @brendandburns @pires |
What @thockin said. |
Is the issue here about Windows? I don't have any first hand background here - if we needed to special case colons on Windows, to manage drive letters, I could maybe understand that. But I thought that was a solved problem already? |
I think this issue is related to the windows because the constraint is removed when kubeneretes support windows nodes. And there're a lot of e2e tests and unit tests which uses
The CRI standard said that the mount path is the path of the mount within the container. So the issue should be fixed in the CRI implementation, not in the kubernetes. |
+1. It should depend on the implementation of container runtime. I don't have more knowledge about docker cri since docker shim was removed from in-tree. |
I don't mean to flip on this one, but it's a very long-standing issue. My feeling is that we should do what the most commonly used runtimes support . It seems like docker has a way to mount on paths with colons via the API, now. Presumably that means containers, too. Does CRI-O? On Windows, colon has two meanings - one is drive letters, which is obvious, but the other is file streams, which is NOT what we want. A quick Google suggests that colons are NOT allowed in directory names on Windows If someone wants to champion this, we will need details about how each runtime supports colons as part of the analysis. |
What happened?
https://github.com/kubernetes/kubernetes/blob/master/pkg/apis/core/types.go#L2110-L2113
but
https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/api/core/v1/types.go#L2283
some people use mountpath:/etc/localtime:ro (k8s should use readonly:true) will not work on containerd but work on docker.
What did you expect to happen?
mountPath can't contain ":"
How can we reproduce it (as minimally and precisely as possible)?
set mountpath:/etc/localtime:ro
Anything else we need to know?
No response
Kubernetes version
any
Cloud provider
no
OS version
Install tools
Container runtime (CRI) and version (if applicable)
Related plugins (CNI, CSI, ...) and versions (if applicable)
The text was updated successfully, but these errors were encountered: