Skip to content

umbrella: rgw: read user usage log in S3 GetUsage - #71102

Merged
batrick merged 8 commits into
ceph:umbrellafrom
RaminNietzsche:wip-79543-umbrella
Sep 28, 2026
Merged

batrick merged 8 commits into
ceph:umbrellafrom
RaminNietzsche:wip-79543-umbrella

Conversation

@RaminNietzsche

@RaminNietzsche RaminNietzsche commented Aug 17, 2026 •

Copy link
Copy Markdown
Member

Summary

Backport of #69459 to umbrella.

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

Why umbrella: the same issue/feature gap exists on umbrella; 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/79672

Testing

  • Includes unittest coverage and qa from main PR
  • Not run locally on umbrella yet

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/79543

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

The Backport ticket already exists as #79543 (Ceph Release=umbrella, Pull request ID=71102), 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 umbrella backport of merged #69459 (tracker #79543). 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 → #79543 (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

Copy link
Copy Markdown
Contributor

ok to test

@adamemerson adamemerson removed releng-audit-fail Release engineering: failed backport verification audit. needs-ci-approval labels Aug 26, 2026
@github-actions github-actions Bot added the releng-audit-pass Release engineering: passed backport verification audit. label Aug 26, 2026
@anrao19

anrao19 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

pr testing completed and approved @ivancich, more details in https://tracker.ceph.com/issues/80191
@RaminNietzsche , if no further testing is needed we can merge this pr

@batrick batrick modified the milestones: umbrella, v21.1.2 Sep 28, 2026
@batrick
batrick merged commit f9813a4 into ceph:umbrella Sep 28, 2026
17 of 18 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