Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sanity: volumes of zero capacity can be recreated
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
- Loading branch information