Repository navigation
squid: rgw: read user usage log in S3 GetUsage - #71101
Conversation
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) Conflicts: examples/rgw/boto3/service-2.sdk-extras.json Took the GetUsageStats-related sdk-extras shapes from main (this commit). Squid's prior extras layout differed; later formatting commits in this backport series polish the GetUsageStats shapes.
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)
|
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 |
|
Hi — Releng Audit is failing for two reasons:
Thanks! |
|
Ping for review, please. This is the squid backport of merged #69459 (tracker #79542). @ceph/rgw could someone take a look and, if you are a Ceph org member, add Releng Audit is still failing: I cannot create |
|
ok to test |
There was a problem hiding this comment.
Ceph Release Engineering Audit Report
Commit Parity Visualizer
| BACKPORT PR #71101 | SOURCE PR |
SOURCE STATUS |
|---|---|---|
| 9bd71d2 rgw: read user usage log in S3 GetUsage | PR #69459 | 28928ec rgw: read user usage log in S3 GetUsage |
| 62d1bdc qa/rgw: test S3 GET /?usage returns usage log entries | c8797c7 qa/rgw: test S3 GET /?usage returns usage log entries | |
| a6ddbaf rgw: fix GetUsageStats docs/qa/boto3 | 21b4956 rgw: fix GetUsageStats docs/qa/boto3 | |
| 8b16614 rgw: keep boto3 sdk-extras.json formatting | e430c78 rgw: keep boto3 sdk-extras.json formatting | |
| 008e9d3 rgw: match GetUsageStats sdk-extras formatting style | f4fb1e0 rgw: match GetUsageStats sdk-extras formatting style | |
| 60c97c1 rgw: compact remaining GetUsageStats sdk-extras shapes | 3ff9d3f rgw: compact remaining GetUsageStats sdk-extras shapes | |
| d49c10d rgw: match UsageStatsSummary members to review suggestion | 21b8f19 rgw: match UsageStatsSummary members to review suggestion | |
| af0cf11 rgw: apply reviewer JSON style to GetUsageStats shapes | a3523b1 rgw: apply reviewer JSON style to GetUsageStats shapes |
Automated Backport Parity Review - Cherry-Pick Conflicts / Deviations
A conflict or deviation was detected during the simulation of this backport. The code in this PR does not match a clean cherry-pick of the upstream commits.
This does not necessarily indicate an issue but a maintainer should review.
**Click to expand conflict summaries.**
Deviation in Backport a6ddbaf (cherry-pick of 21b4956)
Affected File(s)
examples/rgw/boto3/service-2.sdk-extras.json
Range Diff
Click to expand
--- Original (21b49561)
+++ Backport (a6ddbafe)
@@ -16,3 +16,10 @@
Entries/CapacityUsed response fields alongside existing Summary stats.
Signed-off-by: ramin.najarbashi <[email protected]>
+(cherry picked from commit 21b495619616d6718bd517fd33be5f024ed2a7de)
+
+Conflicts:
+ examples/rgw/boto3/service-2.sdk-extras.json
+ Took the GetUsageStats-related sdk-extras shapes from main (this
+ commit). Squid's prior extras layout differed; later formatting
+ commits in this backport series polish the GetUsageStats shapes.
================================================================================
RANGE DIFF
================================================================================
1: 21b49561961 ! 1: a6ddbafe795 rgw: fix GetUsageStats docs/qa/boto3
@@ Commit message
Entries/CapacityUsed response fields alongside existing Summary stats.
Signed-off-by: ramin.najarbashi <[email protected]>
+ (cherry picked from commit 21b495619616d6718bd517fd33be5f024ed2a7de)
+
+ Conflicts:
+ examples/rgw/boto3/service-2.sdk-extras.json
+ Took the GetUsageStats-related sdk-extras shapes from main (this
+ commit). Squid's prior extras layout differed; later formatting
+ commits in this backport series polish the GetUsageStats shapes.
## doc/radosgw/s3/serviceops.rst ##
@@ doc/radosgw/s3/serviceops.rst: Response Entities
@@ examples/rgw/boto3/service-2.sdk-extras.json
- "documentationUrl":"https://docs.ceph.com/docs/master/radosgw/s3/bucketops/#delete-notification",
- "documentation":"<p>Deletes the notification configuration from the bucket.</p>"
- },
-- "PostBucketLogging":{
-- "name":"PostBucketLogging",
-- "http":{
-- "method":"POST",
-- "requestUri":"/{Bucket}?logging",
-- "responseCode":201
-- },
-- "input":{"shape":"PostBucketLoggingRequest"},
-- "output": {"shape": "PostBucketLoggingOutput"},
-- "documentationUrl":"https://docs.ceph.com/docs/master/radosgw/s3/bucketops/#post-bucket-logging",
-- "documentation":"<p>Flushes the logging objects of the buckets.</p>"
-- },
-- "PutBucketLogging":{
-- "name":"PutBucketLogging",
-- "http":{
-- "method":"PUT",
-- "requestUri":"/{Bucket}?logging"
-- },
-- "input":{"shape":"PutBucketLoggingRequest"},
-- "output": {"shape": "PutBucketLoggingOutput"},
-- "documentationUrl":"https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLogging.html",
-- "documentation":"<p>Put bucket logging configuration on source bucket.</p>"
-- },
- "GetUsageStats":{
- "name":"GetUsageStats",
- "http":{
@@ examples/rgw/boto3/service-2.sdk-extras.json
- "location":"querystring",
- "locationName":"allow-unordered"
- }
-- }
-- },
-- "ListObjectsV2Request": {
-- "members": {
-- "AllowUnordered": {
-- "shape":"AllowUnordered",
-- "documentation":"<p>Allow the listing results to be returned in unsorted order. This may be faster when listing very large buckets.</p>",
-- "location":"querystring",
-- "locationName":"allow-unordered"
-- }
-- }
-- },
-- "ReplicationRule":{
-- "members":{
-- "Source": {
-- "shape":"S3RepSource",
-- "documentation":"<p>A container for information about the replication source.<p>",
-- "locationName":"Source"
-- }
-- }
-- },
-- "S3RepSource": {
-- "type": "structure",
-- "members": {
-- "Zones": {
-- "shape":"ZoneList",
-- "documentation":"<p>Array of replication source zone names.</p>",
-- "locationName":"Zone"
-- }
-- }
-- },
-- "Destination": {
-- "members": {
-- "Zones": {
-- "shape":"ZoneList",
-- "documentation":"<p>Array of replication destination zone names.</p>",
-- "locationName":"Zone"
-- }
-- }
-- },
-- "ZoneList": {
-- "type":"list",
-- "member":{"shape":"Zone"},
-- "flattened":true
-- },
-- "Zone":{"type":"string"},
-- "AllowUnordered":{"type":"boolean"},
-- "PutObjectRequest": {
-- "members": {
-- "AppendPosition": {
-- "shape":"AppendPosition",
-- "documentation": "<p>Position to allow appending</p>",
-- "location": "querystring",
-- "locationName": "position"
+ "version": 1.0,
+ "merge": {
+ "operations": {
@@ examples/rgw/boto3/service-2.sdk-extras.json
+ "method": "DELETE",
+ "requestUri": "/{Bucket}?notification",
+ "responseCode": 204
- },
-- "Append": {
-- "shape":"Append",
-- "documentation":"<p>Append Object</p>",
-- "location": "querystring",
-- "locationName": "append"
-- }
++ },
+ "input": {
+ "shape": "DeleteBucketNotificationConfigurationRequest"
+ },
@@ examples/rgw/boto3/service-2.sdk-extras.json
+ "documentation": "<p>Get usage stats for the authenticated user. Returns storage totals, per-bucket capacity, and (when usage logging is enabled) per-operation statistics.</p>"
}
},
-- "Append": {"type":"boolean"},
-- "AppendPosition":{"type":"integer"},
-- "PutObjectOutput": {
+- "ListObjectsV2Request": {
- "members": {
-- "AppendPosition": {
-- "shape":"AppendPosition",
-- "documentation": "<p>Position to allow appending</p>",
-- "location": "header",
-- "locationName": "x-rgw-next-append-position",
-- "documentationUrl":"https://docs.ceph.com/docs/master/radosgw/s3/objectops/#append-object"
+- "AllowUnordered": {
+- "shape":"AllowUnordered",
+- "documentation":"<p>Allow the listing results to be returned in unsorted order. This may be faster when listing very large buckets.</p>",
+- "location":"querystring",
+- "locationName":"allow-unordered"
+ "shapes": {
+ "ListObjectsRequest": {
+ "members": {
@@ examples/rgw/boto3/service-2.sdk-extras.json
}
- }
- },
-- "GetBucketNotificationConfigurationRequest":{
-- "type":"structure",
-- "required":["Bucket"],
-- "members":{
-- "Bucket":{
-- "shape":"BucketName",
-- "documentation":"<p>Name of the bucket to get the notifications configuration for.</p>",
-- "location":"uri",
-- "locationName":"Bucket"
+- "AllowUnordered":{"type":"boolean"},
+- "PutObjectRequest": {
+- "members": {
+- "AppendPosition": {
+- "shape":"AppendPosition",
+- "documentation": "<p>Position to allow appending</p>",
+- "location": "querystring",
+- "locationName": "position"
- },
-- "Notification":{
-- "shape":"NotificationId",
-- "documentation":"<p>Id of the specific notification on the bucket for which the configuration should be retrieved.</p>",
-- "location":"querystring",
-- "locationName":"notification-id"
+- "Append": {
+- "shape":"Append",
+- "documentation":"<p>Append Object</p>",
+- "location": "querystring",
+- "locationName": "append"
+ },
+ "ListObjectsV2Request": {
+ "members": {
@@ examples/rgw/boto3/service-2.sdk-extras.json
}
- }
- },
-- "DeleteBucketNotificationConfigurationRequest":{
+- "Append": {"type":"boolean"},
+- "AppendPosition":{"type":"integer"},
+- "PutObjectOutput": {
+- "members": {
+- "AppendPosition": {
+- "shape":"AppendPosition",
+- "documentation": "<p>Position to allow appending</p>",
+- "location": "header",
+- "locationName": "x-rgw-next-append-position",
+- "documentationUrl":"https://docs.ceph.com/docs/master/radosgw/s3/objectops/#append-object"
++ },
++ "ReplicationRule": {
++ "members": {
++ "Source": {
++ "shape": "S3RepSource",
++ "documentation": "<p>A container for information about the replication source.<p>",
++ "locationName": "Source"
++ }
+ }
+- }
+- },
+- "GetBucketNotificationConfigurationRequest":{
- "type":"structure",
- "required":["Bucket"],
- "members":{
- "Bucket":{
- "shape":"BucketName",
-- "documentation":"<p>Name of the bucket to delete the notifications configuration from.</p>",
-- "contextParam":{"name":"Bucket"},
+- "documentation":"<p>Name of the bucket to get the notifications configuration for.</p>",
- "location":"uri",
- "locationName":"Bucket"
- },
- "Notification":{
- "shape":"NotificationId",
-- "documentation":"<p>Id of the specific notification on the bucket to be deleted.</p>",
+- "documentation":"<p>Id of the specific notification on the bucket for which the configuration should be retrieved.</p>",
- "location":"querystring",
- "locationName":"notification-id"
+ },
-+ "ReplicationRule": {
++ "S3RepSource": {
++ "type": "structure",
+ "members": {
-+ "Source": {
-+ "shape": "S3RepSource",
-+ "documentation": "<p>A container for information about the replication source.<p>",
-+ "locationName": "Source"
++ "Zones": {
++ "shape": "ZoneList",
++ "documentation": "<p>Array of replication source zone names.</p>",
++ "locationName": "Zone"
+ }
}
- }
- },
-- "PostBucketLoggingRequest":{
+- "DeleteBucketNotificationConfigurationRequest":{
- "type":"structure",
- "required":["Bucket"],
- "members":{
- "Bucket":{
- "shape":"BucketName",
-- "documentation":"<p>Name of the bucket to flush its logging objects.</p>",
-- "contextParam":{"name":"Bucket"},
+- "documentation":"<p>Name of the bucket to delete the notifications configuration from.</p>",
- "location":"uri",
- "locationName":"Bucket"
+- },
+- "Notification":{
+- "shape":"NotificationId",
+- "documentation":"<p>Id of the specific notification on the bucket to be deleted.</p>",
+- "location":"querystring",
+- "locationName":"notification-id"
+ },
-+ "S3RepSource": {
-+ "type": "structure",
++ "Destination": {
+ "members": {
+ "Zones": {
+ "shape": "ZoneList",
-+ "documentation": "<p>Array of replication source zone names.</p>",
++ "documentation": "<p>Array of replication destination zone names.</p>",
+ "locationName": "Zone"
+ }
}
@@ examples/rgw/boto3/service-2.sdk-extras.json
- "Name":{
- "shape":"FilterRuleName",
- "documentation":"<p>The object key name prefix, suffix or regex identifying one or more objects to which the filtering rule applies. The maximum length is 1,024 characters. Overlapping prefixes and suffixes are supported.</p>"
-- },
++ },
++ "ZoneList": {
++ "type": "list",
++ "member": {
++ "shape": "Zone"
+ },
- "Value":{
- "shape":"FilterRuleValue",
- "documentation":"<p>The value that the filter searches for in object key names.</p>"
++ "flattened": true
+ },
-+ "Destination": {
++ "Zone": {
++ "type": "string"
++ },
++ "AllowUnordered": {
++ "type": "boolean"
++ },
++ "PutObjectRequest": {
+ "members": {
-+ "Zones": {
-+ "shape": "ZoneList",
-+ "documentation": "<p>Array of replication destination zone names.</p>",
-+ "locationName": "Zone"
++ "AppendPosition": {
++ "shape": "AppendPosition",
++ "documentation": "<p>Position to allow appending</p>",
++ "location": "querystring",
++ "locationName": "position"
++ },
++ "Append": {
++ "shape": "Append",
++ "documentation": "<p>Append Object</p>",
++ "location": "querystring",
++ "locationName": "append"
+ }
}
},
@@ examples/rgw/boto3/service-2.sdk-extras.json
- "shape":"S3KeyFilter",
- "documentation":"<p/>",
- "locationName":"S3Key"
-+ "ZoneList": {
-+ "type": "list",
-+ "member": {
-+ "shape": "Zone"
- },
+- },
- "Metadata":{
- "shape":"S3MetadataFilter",
- "documentation":"<p/>",
@@ examples/rgw/boto3/service-2.sdk-extras.json
- "shape":"S3TagsFilter",
- "documentation":"<p/>",
- "locationName":"S3Tags"
-+ "flattened": true
-+ },
-+ "Zone": {
-+ "type": "string"
-+ },
-+ "AllowUnordered": {
-+ "type": "boolean"
-+ },
-+ "PutObjectRequest": {
-+ "members": {
-+ "AppendPosition": {
-+ "shape": "AppendPosition",
-+ "documentation": "<p>Position to allow appending</p>",
-+ "location": "querystring",
-+ "locationName": "position"
-+ },
-+ "Append": {
-+ "shape": "Append",
-+ "documentation": "<p>Append Object</p>",
-+ "location": "querystring",
-+ "locationName": "append"
-+ }
- }
+- }
-
- },
+- },
- "documentation":"<p>Specifies object key name filtering rules. For information about key name filtering, see <a href=\"https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html\">Configuring Event Notifications</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>"
- },
- "S3KeyFilter":{
@@ examples/rgw/boto3/service-2.sdk-extras.json
+ "locationName": "Bucket"
+ }
}
-- }
-- },
-- "UsageStatsSummary": {
-- "type": "structure",
-- "members": {
-- "QuotaMaxBytes":{"shape":"QuotaMaxBytes"},
-- "QuotaMaxBuckets":{"shape": "QuotaMaxBuckets"},
-- "QuotaMaxObjCount":{"shape":"QuotaMaxObjCount"},
-- "QuotaMaxBytesPerBucket":{"shape":"QuotaMaxBytesPerBucket"},
-- "QuotaMaxObjCountPerBucket":{"shape":"QuotaMaxObjCountPerBucket"},
-- "TotalBytes":{"shape":"TotalBytes"},
-- "TotalBytesRounded":{"shape":"TotalBytesRounded"},
-- "TotalEntries":{"shape":"TotalEntries"}
-- }
-- },
-- "QuotaMaxBytes":{"type":"integer"},
-- "QuotaMaxBuckets":{"type": "integer"},
-- "QuotaMaxObjCount":{"type":"integer"},
-- "QuotaMaxBytesPerBucket":{"type":"integer"},
-- "QuotaMaxObjCountPerBucket":{"type":"integer"},
-- "TotalBytesRounded":{"type":"integer"},
-- "TotalBytes":{"type":"integer"},
-- "TotalEntries":{"type":"integer"},
-- "LoggingEnabled":{
-- "type":"structure",
-- "required":[
-- "TargetBucket",
-- "TargetPrefix"
-- ],
-- "members":{
-- "TargetBucket":{
-- "shape":"TargetBucket",
-- "documentation":"<p>Specifies the bucket where you want to store server access logs. You can have your logs delivered to any bucket that you own. You can also configure multiple buckets to deliver their logs to the same target bucket. In this case, you should choose a different <code>TargetPrefix</code> for each source bucket so that the delivered log files can be distinguished by key.</p>"
+ },
+ "FilterRule": {
+ "type": "structure",
@@ examples/rgw/boto3/service-2.sdk-extras.json
+ "documentation": "<p/>",
+ "locationName": "S3Tags"
+ }
- },
-- "TargetGrants":{
-- "shape":"TargetGrants",
-- "documentation":"<p>Container for granting information.</p> <p>Should be used when the write permissions to the tagert bucket should eb different than the permissions of the user performing the operation thta needs to be logged. This is usually used in cased of batched logging. see: <code>RecordBatchSize</code>.</p>"
++ },
+ "documentation": "<p>Specifies object key name filtering rules. For information about key name filtering, see <a href=\"https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html\">Configuring Event Notifications</a> in the <i>Amazon Simple Storage Service Developer Guide</i>.</p>"
+ },
+ "S3KeyFilter": {
@@ examples/rgw/boto3/service-2.sdk-extras.json
+ "documentation": "<p/>",
+ "locationName": "FilterRule"
+ }
- },
-- "TargetPrefix":{
-- "shape":"TargetPrefix",
-- "documentation":"<p>A prefix for all log object keys. If you store log files from multiple buckets in a single bucket, you can use a prefix to distinguish which log files came from which bucket.</p>"
++ },
+ "documentation": "<p>A container for object key name prefix, suffix and regex filtering rules.</p>"
+ },
+ "S3MetadataFilter": {
@@ examples/rgw/boto3/service-2.sdk-extras.json
+ "documentation": "<p/>",
+ "locationName": "FilterRule"
+ }
- },
-- "TargetObjectKeyFormat":{
-- "shape":"TargetObjectKeyFormat",
-- "documentation":"<p>key format for log objects.</p>"
++ },
+ "documentation": "<p>A container for metadata filtering rules.</p>"
+ },
+ "S3TagsFilter": {
@@ examples/rgw/boto3/service-2.sdk-extras.json
+ "documentation": "<p/>",
+ "locationName": "FilterRule"
+ }
- },
-- "ObjectRollTime":{
-- "shape":"ObjectRollTime",
-- "documentation":"<p>time in seconds to move the log object to the target bucket and start another log object.</p>"
++ },
+ "documentation": "<p>A container for object tags filtering rules.</p>"
+ },
+ "QuotaMaxBytes": {
@@ examples/rgw/boto3/service-2.sdk-extras.json
+ "documentation": "<p>Partitioned S3 key for log objects.</p>",
+ "locationName": "PartitionedPrefix"
+ }
- },
-- "LoggingType":{
-- "shape":"LoggingType",
-- "documentation":"<p>use Standard log type to log all bucket operations i nthe standard format. use Journal log type to log only creations and deletion of objects in more compact format.</p>"
++ },
+ "documentation": "<p>Key format for log objects. Only one format, PartitionedPrefix or SimplePrefix, is allowed.</p>"
+ },
+ "SimplePrefix": {
@@ examples/rgw/boto3/service-2.sdk-extras.json
+ "shape": "PartitionDateSource",
+ "documentation": "<p>Specifies the partition date source for the partitioned prefix. PartitionDateSource can be EventTime or DeliveryTime.</p>"
+ }
- },
-- "RecordsBatchSize":{
-- "shape":"RecordsBatchSize",
-- "documentation":"indicates how many records to batch in memory before writing to the object. if set to zero, records are written syncronously to the object. if <code>ObjectRollTime</code>e is reached, the batch of records will be written to the object regardless of the number of records. </p>"
++ },
+ "documentation": "<p>Amazon S3 keys for log objects are partitioned in the following format:</p> <p> <code>[DestinationPrefix][SourceAccountId]/[SourceRegion]/[SourceBucket]/[YYYY]/[MM]/[DD]/[YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString]</code> </p> <p>PartitionedPrefix defaults to EventTime delivery when server access logs are delivered.</p>",
+ "locationName": "PartitionedPrefix"
+ },
@@ examples/rgw/boto3/service-2.sdk-extras.json
+ "documentation": "<p/>",
+ "locationName": "S3Key"
+ }
- },
-- "Filter":{
-- "shape":"LoggingConfigurationFilter",
-- "documentation":"<p>A filter for all log object. Filter for the object by its key (prefix, suffix and regex).</p>"
++ },
+ "documentation": "<p>A filter for all log object. Filter for the object by its key (prefix, suffix and regex).</p>",
+ "locationName": "Filter"
+ },
@@ examples/rgw/boto3/service-2.sdk-extras.json
+ "location": "querystring",
+ "locationName": "read-stats"
+ }
- }
- },
-- "documentation":"<p>Describes where logs are stored the prefix assigned to all log object keys for a bucket, and their format. also, the level the delivery guarantee of the records.</p>"
-- },
-- "TargetObjectKeyFormat":{
-- "type":"structure",
-- "members":{
-- "SimplePrefix":{
-- "shape":"SimplePrefix",
-- "documentation":"<p>To use the simple format for S3 keys for log objects. To specify SimplePrefix format, set SimplePrefix to {}.</p>",
-- "locationName":"SimplePrefix"
++ }
++ },
+ "PostBucketLoggingOutput": {
+ "type": "structure",
+ "members": {
@@ examples/rgw/boto3/service-2.sdk-extras.json
+ "type": "list",
+ "member": {
+ "shape": "UsageStatsEntryUser"
- },
-- "PartitionedPrefix":{
-- "shape":"PartitionedPrefix",
-- "documentation":"<p>Partitioned S3 key for log objects.</p>",
-- "locationName":"PartitionedPrefix"
++ },
+ "flattened": true
+ },
+ "UsageStatsEntryUser": {
@@ examples/rgw/boto3/service-2.sdk-extras.json
+ "Buckets": {
+ "shape": "UsageStatsEntryBuckets"
+ }
- }
- },
-- "documentation":"<p>Key format for log objects. Only one format, PartitionedPrefix or SimplePrefix, is allowed.</p>"
-- },
-- "SimplePrefix":{
-- "type":"structure",
-- "members":{
-- },
-- "documentation":"<p>To use simple format for S3 keys for log objects, set SimplePrefix to an empty object.</p> <p> <code>[DestinationPrefix][YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString]</code> </p>",
-- "locationName":"SimplePrefix"
-- },
-- "PartitionDateSource":{
-- "type":"string",
-- "enum":[
-- "EventTime",
-- "DeliveryTime"
-- ]
-- },
-- "PartitionedPrefix":{
-- "type":"structure",
-- "members":{
-- "PartitionDateSource":{
-- "shape":"PartitionDateSource",
-- "documentation":"<p>Specifies the partition date source for the partitioned prefix. PartitionDateSource can be EventTime or DeliveryTime.</p>"
-- }
-- },
-- "documentation":"<p>Amazon S3 keys for log objects are partitioned in the following format:</p> <p> <code>[DestinationPrefix][SourceAccountId]/[SourceRegion]/[SourceBucket]/[YYYY]/[MM]/[DD]/[YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString]</code> </p> <p>PartitionedPrefix defaults to EventTime delivery when server access logs are delivered.</p>",
-- "locationName":"PartitionedPrefix"
-- },
-- "ObjectRollTime":{"type":"integer"},
-- "RecordsBatchSize":{"type":"integer"},
-- "LoggingType":{
-- "type":"string",
-- "enum": [
-- "Standard",
-- "Journal"
-- ]
-- },
-- "LoggingConfigurationFilter":{
-- "type":"structure",
-- "members":{
-- "Key":{
-- "shape":"S3KeyFilter",
-- "documentation":"<p/>",
-- "locationName":"S3Key"
++ }
++ },
+ "UsageStatsEntryBuckets": {
+ "type": "structure",
+ "members": {
@@ examples/rgw/boto3/service-2.sdk-extras.json
+ "shape": "UsageStatsEntryBucketItemList",
+ "locationName": "Bucket"
+ }
- }
- },
-- "documentation":"<p>A filter for all log object. Filter for the object by its key (prefix, suffix and regex).</p>",
-- "locationName":"Filter"
-- },
-- "HeadBucketRequest": {
-- "members": {
-- "ReadStats":{
-- "shape":"ReadStats",
-- "documentation":"<p>Read additional usage statistics for <code>ObjectCount</code> and <code>BytesUsed</code> in the response.</p> <note> <p>This request parameter is a Ceph RGW extension.</p> </note>",
-- "location":"querystring",
-- "locationName":"read-stats"
++ }
++ },
+ "UsageStatsEntryBucketItemList": {
+ "type": "list",
+ "member": {
@@ examples/rgw/boto3/service-2.sdk-extras.json
+ "shape": "UsageBucketName",
+ "locationName": "Bucket"
+ }
- }
-- }
-- },
-- "PostBucketLoggingOutput": {
-- "type":"structure",
-- "members":{
-- "FlushedLoggingObject": {
-- "shape":"FlushedLoggingObject",
-- "documentation":"<p>Name of the pending logging object that was flushed.</p>"
-- }
-- }
-- },
-- "PutBucketLoggingOutput": {
-- "type":"structure",
-- "members":{
-- "FlushedLoggingObject": {
-- "shape":"FlushedLoggingObject",
-- "documentation":"<p>Name of the pending logging object that was flushed.</p>"
-- }
-- }
-- },
-- "FlushedLoggingObject":{
-- "type":"string"
-- },
-- "HeadBucketOutput":{
-- "type":"structure",
-- "members":{
-- "ObjectCount":{
-- "shape":"ObjectCount",
-- "documentation": "<p>Total number of objects/versions in the bucket.</p>",
-- "location": "header",
-- "locationName": "x-rgw-object-count"
++ }
+ },
+ "UsageStatsCategories": {
+ "type": "structure",
@@ examples/rgw/boto3/service-2.sdk-extras.json
+ "type": "list",
+ "member": {
+ "shape": "UsageCategoryEntry"
- },
-- "BytesUsed":{
-- "shape":"BytesUsed",
-- "documentation": "<p>Total size in bytes of all objects/versions in the bucket.</p>",
-- "location": "header",
-- "locationName": "x-rgw-bytes-used"
++ },
+ "flattened": true
+ },
+ "UsageCategoryEntry": {
@@ examples/rgw/boto3/service-2.sdk-extras.json
+ "SuccessfulOps": {
+ "shape": "SuccessfulOps"
+ }
- }
-- }
-- },
-- "ReadStats":{"type":"boolean"},
-- "ObjectCount":{"type":"integer"},
-- "BytesUsed":{"type":"integer"},
-- "CreateBucketConfiguration":{
-- "type":"structure",
-- "members":{
-- "BucketIndex":{
-- "shape":"BucketIndex",
-- "documentation":"<p>Configuration to customize the bucket index layout.</p> <note> <p>This element is a Ceph RGW extension.</p> </note>"
++ }
+ },
+ "UsageStatsS3Select": {
+ "type": "structure",
@@ examples/rgw/boto3/service-2.sdk-extras.json
+ "BytesReturned": {
+ "shape": "BytesReturned"
+ }
- }
-- }
-- },
-- "BucketIndex":{
-- "type":"structure",
-- "required":[
-- "Type"
-- ],
-- "members":{
-- "Type":{
-- "shape":"BucketIndexType",
-- "documentation":"<p>Bucket index type: Normal or Indexless.</p>"
++ }
+ },
+ "UsageStatsCapacityUsed": {
+ "type": "structure",
@@ examples/rgw/boto3/service-2.sdk-extras.json
+ "type": "list",
+ "member": {
+ "shape": "UsageStatsSummaryUser"
- },
-- "NumShards":{
-- "shape":"BucketIndexNumShards",
-- "documentation":"<p>Number of initial bucket index shards. Only valid for the <code>Normal</code> index type.</p>"
++ },
+ "flattened": true
+ },
+ "UsageStatsSummaryUser": {
@@ examples/rgw/boto3/service-2.sdk-extras.json
+ "shape": "UsageStatsTotal",
+ "locationName": "Total"
+ }
- }
++ }
+ },
+ "UsageStatsTotal": {
+ "type": "structure",
@@ examples/rgw/boto3/service-2.sdk-extras.json
+ "type": "string"
}
},
-- "BucketIndexType":{
-- "type":"string",
-- "enum":[
-- "Normal",
-- "Indexless"
-- ]
+- "UsageStatsSummary": {
+- "type": "structure",
+- "members": {
+- "QuotaMaxBytes":{"shape":"QuotaMaxBytes"},
+- "QuotaMaxBuckets":{"shape": "QuotaMaxBuckets"},
+- "QuotaMaxObjCount":{"shape":"QuotaMaxObjCount"},
+- "QuotaMaxBytesPerBucket":{"shape":"QuotaMaxBytesPerBucket"},
+- "QuotaMaxObjCountPerBucket":{"shape":"QuotaMaxObjCountPerBucket"},
+- "TotalBytes":{"shape":"TotalBytes"},
+- "TotalBytesRounded":{"shape":"TotalBytesRounded"},
+- "TotalEntries":{"shape":"TotalEntries"}
+- }
- },
-- "BucketIndexNumShards":{"type":"integer"}
+- "QuotaMaxBytes":{"type":"integer"},
+- "QuotaMaxBuckets":{"type": "integer"},
+- "QuotaMaxObjCount":{"type":"integer"},
+- "QuotaMaxBytesPerBucket":{"type":"integer"},
+- "QuotaMaxObjCountPerBucket":{"type":"integer"},
+- "TotalBytesRounded":{"type":"integer"},
+- "TotalBytes":{"type":"integer"},
+- "TotalEntries":{"type":"integer"}
- },
- "documentation":"<p/>"
-}How to proceed:
- Authors (Genuine Conflicts): If this is a genuine conflict requiring manual resolution, ensure your resolution is correct. You must explain the conflict resolution in the commit message (e.g., leave the standard Git
Conflicts:block intact) and include an explanation for changes. - Authors (Need Help?): Reach out to the Component Lead for technical guidance on complex code conflicts.
- Component Leads (Review): Please review the Range Diff(s) above to verify the author's manual conflict resolution is correct for this release branch. If the deviation is intentional, documented, and approved then the component lead or @ceph/ceph-release-manager can bypass this check by commenting
/audit override.
Be familiar with the rules and guidelines for writing backports.
🛟 Need Help?
If you need technical help resolving these issues, please consult with the Component Lead. If you need administrative overrides, please see the #ceph-upstream-releases channel on Slack and request a review from the @ceph/ceph-release-manager.
📋 Component Lead / Release Manager
To override the audit failure, apply releng-audit-override label or comment /audit override.
When you are ready for a new audit, please remove the releng-audit-fail label or comment /audit retest.
|
/audit override |
|
✅ Audit Override Applied by @adamemerson. |
|
jenkins test docs |
|
This PR has been added to squid integration testing by anuchaithra started 2026-09-17-05:12. |
pr testing and approved by @ivancich, more details : https://tracker.ceph.com/issues/80594 |
Summary
Backport of #69459 to squid.
S3 GetUsage did not return per-user usage log entries that radosgw-admin usage show returns for the same user.
Why squid: the same issue/feature gap exists on squid; 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.Conflict in
examples/rgw/boto3/service-2.sdk-extras.json: took GetUsageStats shapes from main; later formatting commits polish those shapes.Parent tracker: https://tracker.ceph.com/issues/79539
Official backport tracker: https://tracker.ceph.com/issues/79671
Testing
Checklist
Fixes: https://tracker.ceph.com/issues/79542