-
Notifications
You must be signed in to change notification settings - Fork 194
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
fix: allow resizing to min required size for performance plus disks #1950
Conversation
4c9cfbe
to
95642a9
Compare
95642a9
to
75c3426
Compare
pkg/azuredisk/controllerserver.go
Outdated
@@ -98,7 +98,13 @@ func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) | |||
capacityBytes := req.GetCapacityRange().GetRequiredBytes() | |||
volSizeBytes := int64(capacityBytes) | |||
requestGiB := int(volumehelper.RoundUpGiB(volSizeBytes)) | |||
|
|||
if diskParams.PerformancePlus != nil && *diskParams.PerformancePlus { |
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.
if ... && requestGiB < consts.PerformancePlusMinimumDiskSizeGiB
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.
Ah, sure, fixed.
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.
still not fixed?
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.
sorry, now it should be ok
75c3426
to
2ed798d
Compare
/assign @andyzhangx for review |
2ed798d
to
389893e
Compare
pkg/azuredisk/controllerserver.go
Outdated
if requestGiB < consts.MinimumDiskSizeGiB { | ||
klog.Infof("increasing requested disk size from %vGiB to %vGiB (minimal disk size)") |
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.
append requestGiB, consts.MinimumDiskSizeGiB
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.
Done.
pkg/azuredisk/controllerserver_v2.go
Outdated
if requestGiB < consts.MinimumDiskSizeGiB { | ||
klog.Infof("increasing requested disk size from %vGiB to %vGiB (minimal disk size)") |
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.
append requestGiB, consts.MinimumDiskSizeGiB
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.
Done.
389893e
to
72f743b
Compare
pkg/azuredisk/controllerserver.go
Outdated
if requestGiB < consts.MinimumDiskSizeGiB { | ||
klog.Infof("increasing requested disk size from %vGiB to %vGiB (minimal disk size)", requestGiB, consts.PerformancePlusMinimumDiskSizeGiB) |
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.
it should be MinimumDiskSizeGiB
pkg/azuredisk/controllerserver_v2.go
Outdated
if requestGiB < consts.MinimumDiskSizeGiB { | ||
klog.Infof("increasing requested disk size from %vGiB to %vGiB (minimal disk size)", requestGiB, consts.PerformancePlusMinimumDiskSizeGiB) |
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.
it should be MinimumDiskSizeGiB
72f743b
to
6f8c1a2
Compare
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
/retest
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andyzhangx, RomanBednar 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 |
@RomanBednar: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
/cherrypick release-1.29 |
@andyzhangx: new pull request created: #1986 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. |
/cherrypick release-1.28 |
@andyzhangx: new pull request created: #1987 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. |
/cherrypick release-1.27 |
@andyzhangx: #1950 failed to apply on top of branch "release-1.27":
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
/kind feature
What this PR does / why we need it:
See #1949 for detailed description. This patch would reduce the number of errors users might get when creating performancePlus disks.
Which issue(s) this PR fixes:
Fixes #1949
Requirements:
Special notes for your reviewer:
Patch verified with:
W0829 10:46:37.457074 1 controllerserver.go:103] using PerformancePlus, increasing requested disk size from 5GiB to 513GiB (minimal size for PerformancePlus feature)
Release note: