Open lukaszo opened 5 months ago
Hi @lukaszo and thanks for raising this issue. This is something that would be possible to add, but wouldn't be exactly trivial given then current implementation. I'll add it to our backlog for further discussion. Below are a couple of quotes from the CSI spec for future reference to readers.
Recreating a volume:
This operation MUST be idempotent. If a volume corresponding to the specified volume name already exists, is accessible from accessibility_requirements, and is compatible with the specified capacity_range, volume_capabilities, parameters and mutable_parameters in the CreateVolumeRequest, the Plugin MUST reply 0 OK with the corresponding CreateVolumeResponse.
"already exists" error:
Indicates that a volume corresponding to the specified volume name already exists but is incompatible with the specified capacity_range, volume_capabilities, parameters, accessibility_requirements or volume_content_source.
Hi @jrasell, if I can contribute in any way, please let me know.
Proposal
Allow to update Volume CSI topology.
Use-cases
I'm writing CSI plugin for LVM. I took https://github.com/metal-stack/csi-driver-lvm and replaced Kubernets with Nomad and it works. Using LVM is not a typical use for CSI as it's not a network file system. Volume is available on a specific node only, and I'm setting a proper topology so nomad schedules allocation on a correct node. This works as expected.
The issue is when for some reason I have to move volume to another node. Why would I do that? Because of maintenance of the current node or simply when I want to replace the node.
The process would be like this:
This is not possible though because updating topology is not allowed. I'm not sure why, though.
Attempted Solutions
My current solution is:
This is not a perfect as there is a risk of doing it in a wrong order and deleting a wrong volume :)
What are your thoughts on allowing updating topology?