-
Notifications
You must be signed in to change notification settings - Fork 378
CreateVolumeRequest: clarify additional rules, if any, for volume names #4
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
Comments
I'd suggest that the Plugin take responsibility for mapping or rehashing illegal names into compliant ones, this has worked reasonably well in Cinder/OpenStack. One gotcha to keep in mind is if the CO doesn't use a hash function but instead uses some form of human-readable names. Got seriously burned in the past when multiple admins wanted to use the same Volume name so they used case-permuted versions of the same UTF8 string, as in mysqlvol1 and MySQLVol1. While it's incredibly unlikely that two hashed names will be case-permuted versions of each other it's a total disaster if that happens in practice. |
The spec provides for a unique I see three options for a plugin that supports volume naming using a limited alphabet:
I tend towards (3.) as it simplifies the CSI plugin and makes them more future-proof. I imagine a scenario where AWS lifts some volume naming restriction and now everyone who wants to make use of that have to update their EBS CSI Volume Plugin to do so. |
The storage backend is the source of truth - we should use it as such. |
We decided that we will let the plugin handle this case. We will tighten up name field requirements in #267 |
The volume name in this request is a CO-generated string. Such names are likely to be incompatible with a variety of backend storage implementations (filesystem labels, partition labels, disk labels, logical volume tags all have different requirements/restrictions).
Part of a possible solution to the problem is for plugins to hash the volume name field. Depending on the hash used it may be difficult to for a storage admin to later determine the identity of a volume without help from the CO (consider that the CO had a brain meltdown and some poor admin is trying to pick up the pieces).
Another part of a possible solution is to impose restrictions on length, case, character set, etc. such that hash functions implemented by plugins may attempt to preserve as much of the original CO-generated name as possible (as far as it complies with their internal naming scheme and uniqueness constraints).
Or .. there's probably other ways to slice this problem too. Ideas welcome.
The text was updated successfully, but these errors were encountered: