-
Notifications
You must be signed in to change notification settings - Fork 808
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
Wrong Error Returned When Volume is Attached #515
Comments
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. |
Stale issues rot after 30d 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. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/reopen |
@AndyXiangLi: You can't reopen an issue/PR unless you authored it or you are a collaborator. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/reopen |
@ayberk: Reopened this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/lifecycle frozen |
/kind bug
What happened?
When a EBS volume is attached to another EC2 instance the
ALREADY_EXISTS
error is returned when it seems like theFAILED_PRECONDITION
error should be returned instead because thenode_id
andvolume_id
do not match what the request attachment ofvolume_id
andnode_id
.CSI Spec: https://github.com/container-storage-interface/spec/blob/master/spec.md#controllerpublishvolume-errors
What you expected to happen?
I expected a
FAILED_PRECONDITION
error to be thrown or have this error thrown if the volume was already attached to my node/ec2-instance.How to reproduce it (as minimally and precisely as possible)?
Attach a EBS volume to a ec2-instance using any method, easiest would likely be calling 'CreateVolume`, and go through the normal attachment process or by scheduling a job.
Call the RPC
ControllerPublishVolume
with the samevolume_id
but differentnode_id
than the already attached volume.Anything else we need to know?:
I've located the line that produces this problem here:
aws-ebs-csi-driver/pkg/cloud/cloud.go
Line 358 in db95482
It would be ideal to have this
ALREADY_EXISTS
still work but just also check for thenode_id
that it is attached to before returning that and otherwise returnFAILED_PRECONDITION
.Environment
kubectl version
): N/A (Using Nomad v0.11.2)The text was updated successfully, but these errors were encountered: