Skip to content

src/common : proper handling of units in strict_iec_cast - #58898

Merged
rishabh-d-dave merged 3 commits into
ceph:mainfrom
neesingh-rh:wip-fix-strict-iec-cast
Oct 24, 2024
Merged

rishabh-d-dave merged 3 commits into
ceph:mainfrom
neesingh-rh:wip-fix-strict-iec-cast

Conversation

@neesingh-rh

@neesingh-rh neesingh-rh commented Jul 29, 2024 •

Copy link
Copy Markdown
Contributor

ceph.quota.max_bytes accepting invalid values like TG, GT, KT and setting the values to first letter.

Fixes: https://tracker.ceph.com/issues/67169
Signed-off-by: Neeraj Pratap Singh [email protected]

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

@batrick batrick left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please add tests to src/test/strtol.cc.

@batrick

batrick commented Aug 6, 2024

Copy link
Copy Markdown
Member

Please also update the tracker to: https://tracker.ceph.com/issues/67169

@neesingh-rh
neesingh-rh force-pushed the wip-fix-strict-iec-cast branch from 71ca6d1 to 68dc27f Compare August 6, 2024 15:20
@github-actions github-actions Bot added the tests label Aug 7, 2024
@neesingh-rh

Copy link
Copy Markdown
Contributor Author

jeninks test make check

Comment thread src/common/strtol.cc Resolved
Comment thread src/test/strtol.cc Resolved
@dparmar18

Copy link
Copy Markdown
Contributor

@neesingh-rh apart from adding test cases to src/test/strtol.cc (which are generic cases for func strict_iec_cast) you'd need to add CephFS quota specific cases too i.e. qa/tasks/cephfs/test_quota.py (check test_human_readable_quota_values(), test_human_readable_quota_invalid_values() and test_disable_enable_human_readable_quota_values())

Comment thread src/common/strtol.cc Resolved
Comment thread src/common/strtol.cc Resolved
@neesingh-rh

Copy link
Copy Markdown
Contributor Author

@neesingh-rh apart from adding test cases to src/test/strtol.cc (which are generic cases for func strict_iec_cast) you'd need to add CephFS quota specific cases too i.e. qa/tasks/cephfs/test_quota.py (check test_human_readable_quota_values(), test_human_readable_quota_invalid_values() and test_disable_enable_human_readable_quota_values())

As this PR is related to non-acceptance of invalid values, I have added some more invalid values in test_human_readable_quota_invalid_values()

@neesingh-rh
neesingh-rh force-pushed the wip-fix-strict-iec-cast branch from 787f380 to 4b7deaa Compare August 8, 2024 06:41
@github-actions github-actions Bot added the cephfs Ceph File System label Aug 8, 2024
Comment thread qa/tasks/cephfs/test_quota.py Resolved
@neesingh-rh
neesingh-rh force-pushed the wip-fix-strict-iec-cast branch from 4b7deaa to 8a7e155 Compare August 8, 2024 12:20
Comment thread src/common/strtol.cc Resolved
@vshankar
vshankar requested a review from a team August 9, 2024 14:04
@neesingh-rh
neesingh-rh force-pushed the wip-fix-strict-iec-cast branch from 8a7e155 to 9a44889 Compare September 12, 2024 11:52
Comment thread src/common/strtol.cc Resolved
@neesingh-rh
neesingh-rh force-pushed the wip-fix-strict-iec-cast branch from 9a44889 to 0094d73 Compare September 17, 2024 06:23
@neesingh-rh
neesingh-rh requested a review from batrick September 17, 2024 06:25
Comment thread src/test/strtol.cc Resolved
@neesingh-rh
neesingh-rh force-pushed the wip-fix-strict-iec-cast branch from 0094d73 to fa2b571 Compare September 23, 2024 11:41
@dparmar18

Copy link
Copy Markdown
Contributor

please align the PR/commit title to the issue being fixed

Comment thread src/test/strtol.cc Resolved
@neesingh-rh
neesingh-rh force-pushed the wip-fix-strict-iec-cast branch from fa2b571 to ec945f3 Compare September 23, 2024 16:34
@neesingh-rh neesingh-rh changed the title src/common : fixing bug in strict_iec_cast src/common : proper handling of units in strict_iec_cast Sep 23, 2024
@neesingh-rh
neesingh-rh force-pushed the wip-fix-strict-iec-cast branch from ec945f3 to fa73ce3 Compare September 23, 2024 18:53
@neesingh-rh

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@rishabh-d-dave

Copy link
Copy Markdown
Contributor

@rishabh-d-dave

Copy link
Copy Markdown
Contributor

@rishabh-d-dave

Copy link
Copy Markdown
Contributor

jenkins test make check

@rishabh-d-dave rishabh-d-dave left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants