-
Notifications
You must be signed in to change notification settings - Fork 152
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
CSINode creation fails because spec.drivers[*].nodeID can exceed the maximum allowed length of 128 characters #581
Comments
/sig storage |
@vpnachev: The label(s) In response to this:
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/test-infra repository. |
Thanks for submitting this issue. The reason for 128 length limitation is because the CSI spec. We have decided to update the CSI spec to loose the length constraint on certain fields. And then an update to k8s will resolve this question. |
While I was investigating I was just about to open the issue on k/k side to change the limit, but then I saw that the CSI spec imply the 128 bytes limit. For me, changing the spec is also fine, if it is not too much effort. |
We ran into this also. Registration process failed with error: plugin registration failed with err: error updating CSINode object with CSI driver node info: error updating CSINode: timed out waiting for the condition; caused by: CSINode.storage.k8s.io “removed” is invalid: spec.drivers[0].nodeID: Invalid value: “projects/our-project-30-char/zones/australia-southeast1-a/instances/our-instance-52-char”: must be 128 characters or less, restarting registration container |
Fixes in GKE are in the process of rolling out, first in rapid channel. We will separately work with the CSI community to change the limit. |
This is available in GKE rapid and regular channel already. |
How can other k8s distributions consume the fix? |
You can manually update pkg/apis/storage/validation/validation.go csiNodeIDMaxLength to a larger size to workaround the issue. The plan for fixing it in OSS is:
|
This is not an option for parties which use upstream images and do not maintain fork of k/k.
@msau42 , are these activities part of the milestone for v1.20? Is the above mentioned change to k/k enough or the CSI sidecars need to be updated/adapted as well? |
Agree we should definitely discuss this in the next csi meeting @saad-ali. No changes to sidecars are anticipated. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
@msau42 @Jiawei0227 is there any progress on this? PS. I just saw container-storage-interface/spec#464, excuse me for the troubles. |
Hey @vpnachev , this is the PR. It is still waiting for some reply. I am expecting to get it submitted after next CSI community meeting which is next week. |
We're using csi-powerscale on Tanzu. the driver tried to register 199 chars-long NodeID, with workers node FQDN is 139 chars of it. even with the new csiNodeIDMaxLength of 192, we're out of luck 😅 |
Hmm, if its FQDN is 139, could you help to check why it is so long? Kubernetes has an object length limit of 253 https://www.google.com/search?q=kubernetes+object+name+length+limit&oq=kubernetes+object+lengt&aqs=chrome.2.69i57j0i22i30l2.5623j1j7&sourceid=chrome&ie=UTF-8 With the CSINode length 192 and some potential prefix/suffix we may or may not add to it. We think 192 is a safe length unless there are some special case that you encounter. We had some discussion on the change or length limits in the CSI community meeting: You are also welcome to join the CSI community meeting to bring up any concern you have. Thanks! |
This is from the registrar container of isilon pod in our Vmware TKGI (aka Enterprise Pivotal K8s Service): Registration process failed with error: RegisterPlugin error -- plugin registration failed with err: error updating CSINode object with CSI driver node info: error updating CSINode: timed out waiting for the condition; caused by: CSINode.storage.k8s.io "791b277c-3834-450e-9d89-2368f3d8dbb9" is invalid: spec.drivers[0].nodeID: Invalid value: "791b277c-3834-450e-9d89-2368f3d8dbb9=#=#=2ad4c584-1353-47cb-86c3-69cb730ee82a.worker.pks-24cfafd4-c644-4a18-9941-aba9dc7c743e.service-instance-24cfafd4-c644-4a18-9941-aba9dc7c743e.bosh=#=#=172.28.0.4": must be 128 characters or less, restarting registration container. The second part of that nodeID is what |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
Kubernetes 1.22 increases the limit to 192 characters and Kubernetes 1.23 will allow 256 characters: Closing the issue here as there are no changes required on the driver side. |
@msau42: Closing this issue. In response to this:
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/test-infra repository. |
For GCP projects and nodes with long names the
nodeID
can become longer than 128 characters. If this happens, theCSINode
object cannot be created because of this validation https://github.com/kubernetes/kubernetes/blob/d822b8b230bce0178400e8949ff3f45423d315d0/pkg/apis/storage/validation/validation.go#L345-L347 and the result is that no volume managed by the CSI driver can be attached and used on this node.In my honest opinion, the problem is the used nodeID format
gcp-compute-persistent-disk-csi-driver/pkg/common/utils.go
Line 44 in d7d9f2e
According to the spec
My understanding of the spec is that the CSI driver should not care for the global uniqueness of the Node, so only the Node name should be enough, isn't it? Or at least the placeholders
projects
,zones
, andinstances
can be removed from the nodeID which will free up 25 characters.I have quickly checked the names length limit:
northamerica-northeast1-a
with 25 characters.With two
/
separators the total achieved length is 120 characters which is less than the allowed 128.Here is a sample logs from the
csi-node-driver-registrar
from a k8s cluster on GCP (managed by Gardener)./kind bug
The text was updated successfully, but these errors were encountered: