Project

General

Profile

Actions

Bug #76157

closed
MM LS

Presigned Post request does not calculate incoming traffic

Bug #76157: Presigned Post request does not calculate incoming traffic

Added by Maxim Monin 8 months ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Due date:
% Done:

0%

Source:
Community (user)
Backport:
squid tentacle
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Fixed In:
v21.0.0-1477-gcf1d0522ef
Released In:
v21.2.0~459
Upkeep Timestamp:
2026-10-24T02:19:04+00:00

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
}
}
]
}
],
```


Related issues 2 (0 open — 2 closed)

Copied to rgw - Backport #76625: squid: Presigned Post request does not calculate incoming trafficResolvedLumir Sliva

Actions
Copied to rgw - Backport #76626: tentacle: Presigned Post request does not calculate incoming trafficResolvedLumir Sliva

Actions

LS Updated by Lumir Sliva 7 months ago Actions #1

  • 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.)

PR: https://github.com/ceph/ceph/pull/68571

LS Updated by Lumir Sliva 7 months ago Actions #2

  • Pull request ID set to 68571

CB Updated by Casey Bodley 7 months ago Actions #3

  • 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 Actions #4

  • 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 Actions #5

  • Copied to Backport #76625: squid: Presigned Post request does not calculate incoming traffic added

UB Updated by Upkeep Bot 7 months ago Actions #6

  • Copied to Backport #76626: tentacle: Presigned Post request does not calculate incoming traffic added

UB Updated by Upkeep Bot 7 months ago Actions #7

  • Tags (freeform) set to backport_processed

UB Updated by Upkeep Bot 3 months ago Actions #8

  • 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 Actions #9

  • 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 Actions #10

  • 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
Actions

Also available in: PDF Atom