Skip to content

tentacle: rgw: read user usage log in S3 GetUsage - #71100

Merged
batrick merged 8 commits into
ceph:tentaclefrom
RaminNietzsche:wip-79541-tentacle
Sep 10, 2026
Merged

batrick merged 8 commits into
ceph:tentaclefrom
RaminNietzsche:wip-79541-tentacle

Conversation

@RaminNietzsche

@RaminNietzsche RaminNietzsche commented Aug 17, 2026 •

Copy link
Copy Markdown
Member

Summary

Backport of #69459 to tentacle.

S3 GetUsage did not return per-user usage log entries that radosgw-admin usage show returns for the same user.

Why tentacle: the same issue/feature gap exists on tentacle; operators on this release need the fix landed on main.

Minimal change: cherry-pick of all commits from PR #69459 with git cherry-pick -x.
No manual conflict resolution was required.

Parent tracker: https://tracker.ceph.com/issues/79539
Official backport tracker: https://tracker.ceph.com/issues/79673

Testing

  • Includes unittest coverage and qa from main PR
  • Local (stg-hd1, tentacle tip): ninja bin/radosgw-admin completed successfully after repairing src/isa-l to the branch submodule SHA

Checklist

  • Tracker
    • References tracker ticket
  • Component impact
    • No impact that needs to be tracked
  • Documentation
    • Updates relevant documentation
  • Tests
    • Includes unit test(s)

Fixes: https://tracker.ceph.com/issues/79541

GET /?usage is a service-level request with no bucket in the URL,
so s->bucket is null and the usage log was never read. Entries and
per-category ops in the response were therefore always empty even
when usage logging was enabled. Read usage from the authenticated
user instead, matching RGWUsage::show() behavior.

Signed-off-by: ramin.najarbashi <[email protected]>
(cherry picked from commit 28928ec)
Extend radosgw-admin QA to call GET /?usage after usage data is
flushed and verify CapacityUsed, Entries, and non-zero Ops. This
guards the fix that reads usage from the authenticated user when no
bucket is present in the service-level request.

Signed-off-by: ramin.najarbashi <[email protected]>
(cherry picked from commit c8797c7)
s3_get_usage() used a broken SigV4 URL (?usage in path, empty region),
which returned 403 in teuthology. Sign GET / with usage query param and
default region us-east-1.

Extend usage-s3-getusage to verify Entries owner, Summary ops/bytes, and
cross-check against usage show. Add unit tests for XML parsing helpers.

RGW returns nested XML (Entries, categories, CapacityUsed) that botocore
could not parse into User/Bucket/Ops fields. Add wrapper shapes, flattened
lists, resultWrapper Usage, and GetUsageStatsRequest. Set region_name in
get_usage_stats.py example for correct SigV4 signing.

Document usage logging requirement, start-date/end-date parameters, and
Entries/CapacityUsed response fields alongside existing Summary stats.

Signed-off-by: ramin.najarbashi <[email protected]>
(cherry picked from commit 21b4956)
Restore the previous formatting of service-2.sdk-extras.json and keep only
the GetUsageStats schema additions needed for the example client, per
review feedback.

Signed-off-by: ramin.najarbashi <[email protected]>
(cherry picked from commit e430c78)
Apply AliMasarweh's review nits so the GetUsageStats entries in
service-2.sdk-extras.json use the same compact key spacing as the
surrounding operations and shapes.

Signed-off-by: ramin.najarbashi <[email protected]>
(cherry picked from commit f4fb1e0)
Apply the same compact key spacing to the rest of the GetUsageStats /
UsageStats schema shapes introduced in this series, so they match the
surrounding entries and the earlier formatting nits.

Signed-off-by: ramin.najarbashi <[email protected]>
(cherry picked from commit 3ff9d3f)
Use the compact one-line member form AliMasarweh suggested for
UsageStatsSummary in service-2.sdk-extras.json.

Signed-off-by: ramin.najarbashi <[email protected]>
(cherry picked from commit 21b8f19)
Collapse single-member shapes onto one line and align inner spacing
for all GetUsageStats/UsageStats* definitions added by this PR in
examples/rgw/boto3/service-2.sdk-extras.json, matching the compact
style requested in review.

Signed-off-by: ramin.najarbashi <[email protected]>
(cherry picked from commit a3523b1)
@github-actions

Copy link
Copy Markdown

Thank you for your contribution. Since you are not yet a member of the Ceph organization with write permissions on ceph/ceph.git, our CI will not automatically run. Any member of the Ceph organization may label this PR ci-approved to allow Jenkins CI jobs to run.

github-actions[bot]

This comment was marked as outdated.

@github-actions github-actions Bot added the releng-audit-fail Release engineering: failed backport verification audit. label Aug 17, 2026
@RaminNietzsche

Copy link
Copy Markdown
Member Author

Hi — Releng Audit is currently failing on Missing Backport Tracker for tentacle.

The Backport ticket already exists as #79541 (Ceph Release=tentacle, Pull request ID=71100), but my Redmine account gets HTTP 403 when creating the required copied_to relation from parent #79539.

Could someone with Redmine relation permissions please add:

…and then comment /audit retest? I also left a note on the parent tracker. Thanks!

@RaminNietzsche

Copy link
Copy Markdown
Member Author

Ping for review, please.

This is the tentacle backport of merged #69459 (tracker #79541). needs-rebase is green; there is no Jenkins make-check yet because of needs-ci-approval.

@ceph/rgw could someone take a look and, if you are a Ceph org member, add ok to test / ci-approved?

Releng Audit is still Missing Backport Tracker because I cannot create the copied_to relation from parent #79539 → #79541 (Redmine 403). If someone with tracker permissions can add that relation, /audit retest should follow. If that is the only remaining audit item, a maintainer /audit override is also welcome.

@adamemerson adamemerson removed releng-audit-fail Release engineering: failed backport verification audit. needs-ci-approval labels Aug 26, 2026
@adamemerson

Copy link
Copy Markdown
Contributor

ok to test

@github-actions github-actions Bot added the releng-audit-pass Release engineering: passed backport verification audit. label Aug 26, 2026
@anrao19

anrao19 commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

pr testing completed and approved by @ivancich , more details in : https://tracker.ceph.com/issues/80189.
@RaminNietzsche , if no further testing is needed then this pr can be merged

@batrick batrick modified the milestones: tentacle, v20.2.5 Sep 10, 2026
@batrick
batrick merged commit 36dad83 into ceph:tentacle Sep 10, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants