This change updates the LinodeControllerServer.CreateVolume(...) logic to respect the idempotency requirements described in the CSI spec. This change should hopefully make volume creation more reliable, especially for long-running and error-prone operations like large volume cloning.
Testing:
E2E Testing
Not currently implemented, see #140.
Manual Testing
NOTE: These steps would previously fail because a pre-existing volume would not be respected by CreateVolume(...) after a timeout error.
Build the OCI image and push it to an image registry:
General:
This change updates the
LinodeControllerServer.CreateVolume(...)
logic to respect the idempotency requirements described in the CSI spec. This change should hopefully make volume creation more reliable, especially for long-running and error-prone operations like large volume cloning.Testing:
E2E Testing
Not currently implemented, see #140.
Manual Testing
NOTE: These steps would previously fail because a pre-existing volume would not be respected by CreateVolume(...) after a timeout error.
Build the OCI image and push it to an image registry:
Provision a Kubernetes cluster on Linode. (e.g. RKE2)
Navigate to
helm-chart/csi-driver
.Update values.yaml to point to the image pushed in step 1.
Deploy the Helm chart to your Kubernetes cluster:
Apply a
linode-block-storage
PVC and a job to populate it with random data:Wait for the job to complete.
Create a new PVC cloned from the first PVC (this should take several minutes to finish)
Once the corresponding Linode volume has finished provisioning, observe that the PVC is bound in Kubernetes.
Ensure that only one Linode volume clone event has occurred.
(Optional) Check the CSI controller logs to see the volume creation fail repeatedly until it eventually reconciles.