container-storage-interface / spec

Container Storage Interface (CSI) Specification.
Apache License 2.0
1.34k stars 373 forks source link

validate snapshot name #448

Open tushar1701 opened 4 years ago

tushar1701 commented 4 years ago

During csi-sanity checks , got the following failure:-

[Fail] CreateSnapshot [Controller Server] [It] should succeed when creating snapshot with maximum-length name

Is it documented somewhere about the maximum length value? How can we incorporate this on our CSI driver?

is this piece of information authentic and can be considered?

 Snapshot name must begin with a letter or number, end with a letter, number or underscore,
and may contain only letters, numbers, underscores, periods, or hyphens.
See https://docs.microsoft.com/en-us/rest/api/compute/snapshots/createorupdate#uri-parameters
saad-ali commented 4 years ago

Is it documented somewhere about the maximum length value? How can we incorporate this on our CSI driver?

It's documented under https://github.com/container-storage-interface/spec/blob/master/spec.md#size-limits

That said the 128 byte limit is fairly arbitrary and should be relaxed for fields where it is causing issues, like https://github.com/container-storage-interface/spec/issues/350