-
Notifications
You must be signed in to change notification settings - Fork 149
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
Add NodeUnpublishVolume test for when the volume is missing #242
Add NodeUnpublishVolume test for when the volume is missing #242
Conversation
The spec mandates that such cases should return NOT_FOUND responses [1]. The mock driver already implements the right behavior. [1] https://github.com/container-storage-interface/spec/blob/4731db0e0bc53238b93850f43ab05d9355df0fd9/spec.md#nodeunpublishvolume-errors
Welcome @timoreimann! |
Hi @timoreimann. Thanks for your PR. I'm waiting for a kubernetes-csi member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/sig storag |
@timoreimann: The label(s) 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. |
/sig storage |
The CSI spec mandates that we return NOT_FOUND if the volume isn't found [1]. Otherwise, the calling sidecar will go into an endless retry loop and block other operations on the volume. A test for this case should go into github.com/kubernetes-csi/csi-test but was yet missing. A PR has been submitted [2] and this change has been tested against it. As soon as upstream approves, we can follow up with another PR to incorporate an updated csi-sanity package. [1]: https://github.com/container-storage-interface/spec/blob/4731db0e0bc53238b93850f43ab05d9355df0fd9/spec.md#nodeunpublishvolume-errors [2]: kubernetes-csi/csi-test#242
The CSI spec mandates that we return NOT_FOUND if the volume isn't found [1]. Otherwise, the calling sidecar will go into an endless retry loop and block other operations on the volume. A test for this case should go into github.com/kubernetes-csi/csi-test but was yet missing. A PR has been submitted [2] and this change has been tested against it. As soon as upstream approves, we can follow up with another PR to incorporate an updated csi-sanity package. [1]: https://github.com/container-storage-interface/spec/blob/4731db0e0bc53238b93850f43ab05d9355df0fd9/spec.md#nodeunpublishvolume-errors [2]: kubernetes-csi/csi-test#242
The CSI spec mandates that we return NOT_FOUND if the volume isn't found [1]. Otherwise, the calling sidecar will go into an endless retry loop and block other operations on the volume. A test for this case should go into github.com/kubernetes-csi/csi-test but was yet missing. A PR has been submitted [2] and this change has been tested against it. As soon as upstream approves, we can follow up with another PR to incorporate an updated csi-sanity package. [1]: https://github.com/container-storage-interface/spec/blob/4731db0e0bc53238b93850f43ab05d9355df0fd9/spec.md#nodeunpublishvolume-errors [2]: kubernetes-csi/csi-test#242
/ok-to-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
VolumeId: sc.Config.IDGen.GenerateUniqueValidVolumeID(), | ||
TargetPath: sc.StagingPath, | ||
}) | ||
Expect(err).To(HaveOccurred()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expect.To
without some additional description leads to failure messages that cannot be understood without locating the source code. I know, most of the existing assertions are like that, but for new ones let's use Expect.To(..., "some description")
.
Expect(err).To(HaveOccurred()) | ||
|
||
serverError, ok := status.FromError(err) | ||
Expect(ok).To(BeTrue()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jsafrane, timoreimann The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@pohly sorry, I haven't had a chance to get back to this PR in time before it got merged. I'll address your comments in a follow-up PR. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Adds
NodeUnpublishVolume
test for when the volume is missing.The spec mandates that such cases should return NOT_FOUND responses (reference).
The mock driver already implements the right behavior.
Does this PR introduce a user-facing change?: