Bug #76157
closedPresigned Post request does not calculate incoming traffic
0%
Description
We tested uploading S3 files via the web interface using presigned Put/presigned Post/ and presigned Multipart upload requests and noticed that incoming traffic (bytes_received) in ceph usage log always = 0 for post requests.
```json
{
"entries": [
{
"user": "u_162626",
"buckets": [
{
"bucket": "000",
"time": "2026-04-20T03:00:00.000000Z",
"epoch": 1776654000,
"owner": "u_162626",
"categories": [
{
"category": "complete_multipart",
"bytes_sent": 450,
"bytes_received": 0,
"ops": 1,
"successful_ops": 1
},
{
"category": "delete_obj",
"bytes_sent": 0,
"bytes_received": 0,
"ops": 1,
"successful_ops": 1
},
{
"category": "init_multipart",
"bytes_sent": 312,
"bytes_received": 0,
"ops": 1,
"successful_ops": 1
},
{
"category": "list_bucket",
"bytes_sent": 8907,
"bytes_received": 0,
"ops": 9,
"successful_ops": 9
},
{
"category": "options_cors",
"bytes_sent": 0,
"bytes_received": 0,
"ops": 1,
"successful_ops": 1
},
{
"category": "post_obj",
"bytes_sent": 0,
"bytes_received": 0,
"ops": 1,
"successful_ops": 1
},
{
"category": "put_obj",
"bytes_sent": 0,
"bytes_received": 159168455,
"ops": 1,
"successful_ops": 1
}
],
"s3select": {
"bytes_processed": 0,
"bytes_returned": 0
}
}
]
}
],
```
LS Updated by Lumir Sliva 7 months ago
- Status changed from New to In Progress
- Assignee set to Lumir Sliva
Reproduced on a vstart cluster with rgw_enable_usage_log = true. Uploading the same 1 MiB payload via PUT and presigned POST to the same bucket:
post_obj ops=1 bytes_received=0 put_obj ops=1 bytes_received=1048576
Root cause is that the AccountingFilter (src/rgw/rgw_client_io_filters.h) starts with enabled=false, and only the PUT path explicitly toggles it around its body read. RGWPutObj_ObjStore::get_data wraps recv_body with ACCOUNTING_IO(s)->set_account(true/false); the POST path does not, so every byte pulled off the wire during multipart parsing is silently dropped by the accounter.
All POST body bytes funnel through RGWPostObj_ObjStore::read_with_boundary (two recv_body call sites). Wrapping those in set_account(true/false), mirroring PUT, counts the full POST body:
post_obj ops=1 bytes_received=1049891 put_obj ops=1 bytes_received=1048576
(1 MiB file plus ~1.3 KiB of multipart boundaries/headers, which matches what the wire carried.)
LS Updated by Lumir Sliva 7 months ago
- Pull request ID set to 68571
CB Updated by Casey Bodley 7 months ago
- Status changed from In Progress to Fix Under Review
- Target version deleted (
v20.2.0) - Backport set to squid tentacle
- Affected Versions v20.2.0 added
UB Updated by Upkeep Bot 7 months ago
- Status changed from Fix Under Review to Pending Backport
- Merge Commit set to cf1d0522ef2e31169262911bc360063c183cbbfd
- Fixed In set to v21.0.0-1477-gcf1d0522ef
- Upkeep Timestamp set to 2026-05-15T17:05:43+00:00
UB Updated by Upkeep Bot 7 months ago
- Copied to Backport #76625: squid: Presigned Post request does not calculate incoming traffic added
UB Updated by Upkeep Bot 7 months ago
- Copied to Backport #76626: tentacle: Presigned Post request does not calculate incoming traffic added
UB Updated by Upkeep Bot 7 months ago
- Tags (freeform) set to backport_processed
UB Updated by Upkeep Bot 3 months ago
- Status changed from Pending Backport to Backporting
- Tags (freeform) deleted (
backport_processed) - Upkeep Timestamp changed from 2026-05-15T17:05:43+00:00 to 2026-08-27T18:32:24+00:00
UB Updated by Upkeep Bot about 1 month ago
- Status changed from Backporting to Resolved
- Upkeep Timestamp changed from 2026-08-27T18:32:24+00:00 to 2026-10-21T01:25:54+00:00
UB Updated by Upkeep Bot about 1 month ago
- Released In set to v21.2.0~459
- Upkeep Timestamp changed from 2026-10-21T01:25:54+00:00 to 2026-10-24T02:19:04+00:00