-
Notifications
You must be signed in to change notification settings - Fork 62
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: unnecessary resize volume error #364
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andyzhangx 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 |
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.
Thank you for finding the root cause! We've seen this as well occasionally in GKE.
Is the description correct? The implementation says 100MB in a comment but 1GB in the description. |
Awesome, we'll also want to backport this to csi proxy v1 was well. |
|
delta of the minimum size expand should be at least 1GB, so 100MB is ok. |
d444742
to
3871187
Compare
/lgtm |
/cherrypick library-development |
What type of PR is this?
/kind bug
What this PR does / why we need it:
fix: unnecessary resize volume error
this PR fixes the following resize volume error on Windows just right after disk format and mount succeeds on the node:
we use
Get-Volume -UniqueId \"$Env:volumeID\" | Get-partition | Get-PartitionSupportedSize | Select SizeMax
to get the targetVolumeSize, and we use following command to get the currentVolumeSize
if targetVolumeSize > currentVolumeSize, then we should resize.
But as following example, you could see for a 29.98 GB disk, just right after it's formatted, targetVolumeSize is always bigger than currentVolumeSize (just 1MB bigger), so resize operation would always happen. I think this is a bug, only if targetVolumeSize > currentVolumeSize + 1GB, then we should perform resize operation, in that case, NodeStageVolume should succeed.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: