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 up pdcsi driver size in CreateVolume #684

Merged
merged 1 commit into from
Dec 21, 2020

Conversation

Jiawei0227
Copy link
Contributor

@Jiawei0227 Jiawei0227 commented Dec 16, 2020

What type of PR is this?
/kind bug

What this PR does / why we need it:
Currently if we create a PVC of size 1.5Gi, the pdcsi driver will convert it to 1Gi but the provisioner will say it is 2Gi[1]. And both of them are not accurate. From the CSI spec, we know that we should provide size larger than the requested size. So if user ask for 1.5Gi, we should give them at least 1.5Gi.

This PR changes the RoundDown behavior of CreateVolume to RoundUp. This is to align with the CreateVolume CSI spec that when the required_bytes is set, the driver should provision something bigger.

[1] kubernetes-csi/external-provisioner#199

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Fix a bug that CreateVolume should round up the request_bytes.

/cc @msau42
/cc @saikat-royc
/assign @mattcary

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. labels Dec 16, 2020
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 16, 2020
@Jiawei0227
Copy link
Contributor Author

/cc @saad-ali

Since this is not a trivial bug, we might need to consider if we want to cherrypick it into previous release? @mattcary thoughts?

Copy link
Contributor

@mattcary mattcary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if backporting makes sense; I'm not sure this will justify a backport in GKE as +/-1G isn't a big deal.

Could you create an issue for this bug? Then we could at least have a public discussion about backporting.

@@ -0,0 +1,30 @@
ShortName: pdtest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably don't mean to check in this file?

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 18, 2020
@mattcary
Copy link
Contributor

/approved
/lgtm

Thanks!

Can you mention the issue number in this PR when you create it (or mention this PR in the issue, whatever, just so we can keep track)

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 18, 2020
@Jiawei0227
Copy link
Contributor Author

Can you mention the issue number in this PR when you create it (or mention this PR in the issue, whatever, just so we can keep track)

Done. The bug number is 176099317. Can you help to approve this PR? Thanks a lot!

@mattcary
Copy link
Contributor

/approve

Sorry, I got the wrong approve robot command.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Jiawei0227, mattcary

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 21, 2020
@k8s-ci-robot k8s-ci-robot merged commit 8b3a7e3 into kubernetes-sigs:master Dec 21, 2020
k8s-ci-robot added a commit that referenced this pull request Mar 24, 2021
Cherrypick #682,  #684, #693, #703, #718, #719, #720 to release-1.2 from master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants