-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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
Heketi documentats incorrectly about sizes in GBs #56581
Heketi documentats incorrectly about sizes in GBs #56581
Conversation
Heketi documentation incorrectly says that volume size is created in GB but in fact is in GiB. Fix both resizing and create volume functions to relfect that.
/sig storage cc @obnoxxx |
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.
This change LGTM.
I'd personally split this into two: one that adds to util.go and a second that does the change to glusterfs.go.
But the content looks correct.
/test pull-kubernetes-e2e-gce |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gnufied, humblec Associated issue: 56192 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
@@ -1077,10 +1076,10 @@ func (plugin *glusterfsPlugin) ExpandVolumeDevice(spec *volume.Spec, newSize res | |||
|
|||
// Find out delta size | |||
expansionSize := (newSize.Value() - oldSize.Value()) | |||
expansionSizeGB := int(volume.RoundUpSize(expansionSize, 1000*1000*1000)) | |||
expansionSizeGiB := int(volume.RoundUpSize(expansionSize, volume.GIB)) |
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.
Oh, one thing that just struck me: Since you introduce RoundUpToGiB()
, why don't you use it?
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.
Because, we have to calculate difference and then use RoundUpToGib
and RoundUpToGiB
takes resource.Quantity
as arguments..
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.
Also, there's a typo in the commit message. ("documentats" --> "documents").
A function to round a size up to GiB. Wrapper to RoundUpSize(). Inspired by the function introduced in kubernetes/kubernetes#56581 Signed-off-by: Michael Adam <obnox@redhat.com>
See kubernetes/kubernetes#56192 kubernetes/kubernetes#56581 heketi/heketi#915 Signed-off-by: Michael Adam <obnox@redhat.com>
A function to round a size up to GiB. Wrapper to RoundUpSize(). Inspired by the function introduced in kubernetes/kubernetes#56581 Signed-off-by: Michael Adam <obnox@redhat.com>
See kubernetes/kubernetes#56192 kubernetes/kubernetes#56581 heketi/heketi#915 Signed-off-by: Michael Adam <obnox@redhat.com>
/retest Review the full test history for this PR. |
FYI: new change proposed to heketi to clarify documentation and messages to explicitly state GiB: heketi/heketi#935 I also wouldn't say GB is strictly wrong, it's just ambiguous. Most people understand (1000)^3, some (1024)^3... |
/retest Review the full test history for this PR. |
1 similar comment
/retest Review the full test history for this PR. |
Automatic merge from submit-queue (batch tested with PRs 56401, 56506, 56551, 56298, 56581). If you want to cherry-pick this change to another branch, please follow the instructions here. |
See kubernetes/kubernetes#56192 kubernetes/kubernetes#56581 heketi/heketi#915 Signed-off-by: Michael Adam <obnox@redhat.com>
Heketi documentation incorrectly says that volume size is created in
GB but in fact is in GiB. Fix both resizing and create volume
functions to relfect that.
Fixes #56192