-
Notifications
You must be signed in to change notification settings - Fork 807
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
Node service vs idempotency #307
Comments
The |
I think the aws-ebs-csi-driver/pkg/driver/internal/inflight.go Lines 48 to 61 in 2ea44a9
It won't lock until a
Currently the driver will process both requests at the same time, which is OK in this case. However, if the request is for the same volume and same path, it'll return an error, which is not correct. Note that the problem is not about the key being used, but instead the error returned by the driver. According to the specs, the key should contain the volume ID, the path and the capabilities. We are mostly OK here, but we can't return an error if the same key is being processed:
|
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 |
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 |
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 |
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 |
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 |
@bertinatto |
/kind bug
I think our
inFlight
object isn't providing idempotency for the node service. For example:NodeStageVolume
for a 500 GB volume.NodeStageVolume
again for the same volume.NodeStageVolume
call hasn't returned yet (the driver is still formatting the volume).Since the call is supposed to be idempotent, we shouldn't return an error in step 4.
I believe the best option is to have a per-volume lock, so any operation (stage, publish, resize etc.) on a specific volume will be executed synchronously.
[0] https://github.com/kubernetes-sigs/aws-ebs-csi-driver/blob/v0.3.0/pkg/driver/node.go#L84-L91
CC @leakingtapan @dkoshkin
The text was updated successfully, but these errors were encountered: