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

Heketi documentats incorrectly about sizes in GBs #56581

Merged
merged 1 commit into from
Dec 16, 2017

Conversation

gnufied
Copy link
Member

@gnufied gnufied commented Nov 29, 2017

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

Use GiB unit for creating and resizing volumes for Glusterfs

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.
@k8s-ci-robot k8s-ci-robot added do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 29, 2017
@gnufied
Copy link
Member Author

gnufied commented Nov 29, 2017

/sig storage

cc @obnoxxx

@k8s-ci-robot k8s-ci-robot added the sig/storage Categorizes an issue or PR as relevant to SIG Storage. label Nov 29, 2017
@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 29, 2017
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Nov 29, 2017
Copy link
Contributor

@obnoxxx obnoxxx left a 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.

@gnufied
Copy link
Member Author

gnufied commented Nov 29, 2017

/test pull-kubernetes-e2e-gce

@humblec
Copy link
Contributor

humblec commented Nov 29, 2017

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 29, 2017
@k8s-github-robot
Copy link

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

@@ -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))
Copy link
Contributor

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?

Copy link
Member Author

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..

Copy link
Contributor

@obnoxxx obnoxxx left a 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").

obnoxxx added a commit to obnoxxx/external-storage that referenced this pull request Nov 30, 2017
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>
obnoxxx added a commit to obnoxxx/external-storage that referenced this pull request Nov 30, 2017
obnoxxx added a commit to obnoxxx/external-storage that referenced this pull request Nov 30, 2017
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>
obnoxxx added a commit to obnoxxx/external-storage that referenced this pull request Nov 30, 2017
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to @fejta).

Review the full test history for this PR.

@obnoxxx
Copy link
Contributor

obnoxxx commented Dec 12, 2017

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...

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to @fejta).

Review the full test history for this PR.

1 similar comment
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to @fejta).

Review the full test history for this PR.

@k8s-github-robot
Copy link

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.

@k8s-github-robot k8s-github-robot merged commit 691436a into kubernetes:master Dec 16, 2017
humblec pushed a commit to humblec/gluster-block-external-provisioner that referenced this pull request Apr 21, 2020
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. 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. sig/storage Categorizes an issue or PR as relevant to SIG Storage. 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.

8 participants