-
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
sanity: volumes of zero capacity can be recreated #263
sanity: volumes of zero capacity can be recreated #263
Conversation
In general, when creating a volume of some requested capacity using `CreateVolume`, then re-running the RPC with the same name but different capacity request, this ought to fail with `ALREADY_EXISTS` (according to the spec). However, when the reported capacity of a volume equals zero, the volume capacity is unknown (again according to the spec). As such, when issueing another `CreateVolume` call using the same name but a different requested capacity, this should not necessarily fail, since a volume whose size is (theoretically) unlimited is compatible with *any* requested capacity. This is in line with the spec: > Indicates that a volume corresponding to the specified volume name > already exists but is incompatible with the specified capacity_range, > volume_capabilities or parameters. Given this, the relevant test is updated to *skip* when the capacity as returned by the first `CreateVolume` call equals zero. See: kubernetes-csi#94 See: kubernetes-csi#94 (comment) See: https://github.com/container-storage-interface/spec/blob/e129a75169c13bade7c7336afe21f259740ba679/spec.md#createvolume-errors
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: NicolasT The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @NicolasT. 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. |
/assign @lpabon |
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. |
@NicolasT: PR needs rebase. 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. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closed this PR. 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. |
What type of PR is this?
/kind bug
What this PR does / why we need it:
In general, when creating a volume of some requested capacity using
CreateVolume
, then re-running the RPC with the same name but differentcapacity request, this ought to fail with
ALREADY_EXISTS
(according tothe spec). However, when the reported capacity of a volume equals zero,
the volume capacity is unknown (again according to the spec). As such,
when issueing another
CreateVolume
call using the same name but adifferent requested capacity, this should not necessarily fail, since a
volume whose size is (theoretically) unlimited is compatible with any
requested capacity.
This is in line with the spec:
Given this, the relevant test is updated to skip when the capacity as
returned by the first
CreateVolume
call equals zero.Which issue(s) this PR fixes:
Fixes #94
Special notes for your reviewer:
This is, of course, according to a particular reading of the CSI spec, which may be debatable. However, see #94 (comment) as to why the current test is problematic for some SPs.
Does this PR introduce a user-facing change?: