Skip to content

rgw_rest_s3.cc: update how we report bucket quota cfg info for max size (bytes) and max objects - #63879

Merged
anrao19 merged 1 commit into
mainfrom
BBoozmen-patch-1
Jul 11, 2025
Merged

anrao19 merged 1 commit into
mainfrom
BBoozmen-patch-1

Conversation

@BBoozmen

@BBoozmen BBoozmen commented Jun 11, 2025 •

Copy link
Copy Markdown
Contributor

We came across this issue when running s3-tests suite against a cluster which uses custom "max number of objects per bucket". The custom default value is set as follows

sudo ceph config set client.rgw rgw_bucket_default_quota_max_objects 2000000

which sets the bucket quota for new users as follows:

    "bucket_quota": {
        "enabled": true,
        "check_on_raw": false,
        "max_size": -1,
        "max_size_kb": 0,
        "max_objects": 2000000
    },

However, test_s3.py::test_account_usage is failing as follows

>       assert summary['QuotaMaxBytesPerBucket'] == '-1'
E       AssertionError: assert '2000000' == '-1'
E
E         - -1
E         + 2000000

and "summary" objects report

{'QuotaMaxBytes': '-1', 'QuotaMaxBuckets': '1000', 'QuotaMaxObjCount': '-1', 'QuotaMaxBytesPerBucket': '2000000', 'QuotaMaxObjCountPerBucket': '-1', 'TotalBytes': '0', 'TotalBytesRounded': '0', 'TotalEntries': '0'}

Here, QuotaMaxObjCountPerBucket is supposed to be 2M but not QuotaMaxBytesPerBucket.

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

@BBoozmen BBoozmen self-assigned this Jun 11, 2025
@BBoozmen
BBoozmen requested a review from a team as a code owner June 11, 2025 13:56
@github-actions github-actions Bot added the rgw label Jun 11, 2025
@BBoozmen BBoozmen changed the title rgw_rest_s3.cc: update how we set bucket quota cfg for max size (bytes) and max objects rgw_rest_s3.cc: update how we report bucket quota cfg info for max size (bytes) and max objects Jun 11, 2025
@cbodley

cbodley commented Jun 11, 2025

Copy link
Copy Markdown
Contributor

jenkins test make check arm64

@anrao19

anrao19 commented Jul 11, 2025

Copy link
Copy Markdown
Contributor

@anrao19
anrao19 merged commit 7d07a72 into main Jul 11, 2025
@anrao19
anrao19 deleted the BBoozmen-patch-1 branch July 11, 2025 05:41
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