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

fix: quota is not calculated correctly #161

Merged
merged 4 commits into from
Sep 6, 2023

Conversation

MingZhang-YBPS
Copy link
Contributor

@MingZhang-YBPS MingZhang-YBPS commented Aug 3, 2023

Pull Request template

Why is this PR required? What issue does it fix?:

If the pvc storage is 1G, which means 1073741824Byte. The quota returned from convertToK() is 1073742k which is bigger than expected. While, the correct result shall be 1048576k
image

What this PR does?:
Fix the quota calculation logic

Does this PR require any upgrade changes?:
No

If the changes in this PR are manually verified, list down the scenarios covered::
The same scenariom, the quota returned is 1048576k after fix
image

Any additional information for your reviewer? :
Mention if this PR is part of any design or a continuation of previous PRs

Checklist:

  • Fixes #
  • PR Title follows the convention of <type>(<scope>): <subject>
  • Has the change log section been updated?
  • Commit has unit tests
  • Commit has integration tests
  • (Optional) Are upgrade changes included in this PR? If not, mention the issue/PR to track:
  • (Optional) If documentation changes are required, which issue on https://github.com/openebs/openebs-docs is used to track them:

@sonatype-lift
Copy link

sonatype-lift bot commented Aug 3, 2023

Sonatype Lift is retiring

Sonatype Lift will be retiring on Sep 12, 2023, with its analysis stopping on Aug 12, 2023. We understand that this news may come as a disappointment, and Sonatype is committed to helping you transition off it seamlessly. If you’d like to retain your data, please export your issues from the web console.
We are extremely grateful and thank you for your support over the years.

📖 Read about the impacts and timeline

@MingZhang-YBPS MingZhang-YBPS changed the title Update helper_hostpath.go quota is not calculated correctly Aug 3, 2023
@MingZhang-YBPS MingZhang-YBPS changed the title quota is not calculated correctly fix: quota is not calculated correctly Aug 3, 2023
@MingZhang-YBPS MingZhang-YBPS force-pushed the fix-quota-calc branch 2 times, most recently from 9ba0bf3 to 17b3db9 Compare August 8, 2023 01:32
@MingZhang-YBPS
Copy link
Contributor Author

MingZhang-YBPS commented Aug 11, 2023

@niladrih could you please help to review?

@niladrih niladrih self-requested a review September 5, 2023 07:54
Copy link
Member

@niladrih niladrih left a comment

Choose a reason for hiding this comment

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

Hey, thanks for this fix. You'd have to fix the unit test TestConvertToK as well..

MingZhang-YBPS and others added 4 commits September 6, 2023 10:59
Signed-off-by: 张铭 <[email protected]>
Signed-off-by: 张铭 <[email protected]>
@MingZhang-YBPS
Copy link
Contributor Author

Hey, thanks for this fix. You'd have to fix the unit test TestConvertToK as well..

@niladrih Done, could you please help to have a look again?

Copy link
Member

@niladrih niladrih left a comment

Choose a reason for hiding this comment

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

Looks good

@niladrih niladrih merged commit a4a9273 into openebs:develop Sep 6, 2023
@MingZhang-YBPS MingZhang-YBPS deleted the fix-quota-calc branch September 7, 2023 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants