Skip to content
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

Round capacity up to minimum supported size #435

Closed
timoreimann opened this issue Jun 7, 2022 · 1 comment
Closed

Round capacity up to minimum supported size #435

timoreimann opened this issue Jun 7, 2022 · 1 comment

Comments

@timoreimann
Copy link
Contributor

With regards to the size of a volume, the CSI spec supports specifying two parameters: required_bytes (which is really the minimum) and limit_bytes (the maximum). The driver is free to choose a value within the given range; specifically, if limit_bytes is not specified and required_bytes is below what is supported by the storage provider, then the driver should round up to the minimum supported size (1 GiB in DigitalOcean). See also the CSI spec on CreateVolume, especially the CapacityRange message.

Today, our CSI driver does not adhere to the spec and instead errors out if required_bytes is set below the minimum while limit_bytes is unset (which is always the case in Kubernetes as of today). The behavior should be fixed by rounding up accordingly.

This change is best shipped as a major release to make it clear to users that the behavior is going to change somewhat (though practically, most users would have presumably just increased the value anyway after they received an error).

We should also sanity-check if this change could have any negative impact when creating volumes from existing sources (e.g., snapshots).

The issue was surfaced along kubernetes/kubernetes#110277.

@timoreimann
Copy link
Contributor Author

Implemented by the referenced PR and to be released soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant