tentacle: rgw: account presigned POST bytes_received in usage log#68959
tentacle: rgw: account presigned POST bytes_received in usage log#68959lumir-sliva wants to merge 1 commit into
Conversation
Presigned POST uploads reported bytes_received=0 in the usage log, while equivalent PUT uploads reported the full object size. The AccountingFilter starts disabled, and only the PUT path explicitly enables it around its body read. POST bodies are consumed via RGWPostObj_ObjStore::read_with_boundary, which did not toggle accounting around its recv_body calls, so every byte pulled off the wire during multipart parsing was silently dropped by the accounter. Wrap the two recv_body calls in read_with_boundary with ACCOUNTING_IO(s)->set_account(true/false), mirroring the PUT pattern in RGWPutObj_ObjStore::get_data. POST uploads now account correctly; PUT behavior is unchanged. Signed-off-by: Lumir Sliva <61183145+lumir-sliva@users.noreply.github.com> Tracker: https://tracker.ceph.com/issues/76157 Reported-by: Maxim Monin (cherry picked from commit 7d2484c)
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
15 similar comments
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
|
Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run. |
Cherry-pick of 7d2484c to tentacle.
Presigned POST uploads reported
bytes_received=0in the usage log, whileequivalent PUT uploads reported the full object size.
The
AccountingFilterstarts disabled, and only the PUT path explicitlyenables it around its body read. POST bodies are consumed via
RGWPostObj_ObjStore::read_with_boundary, which did not toggle accountingaround its
recv_bodycalls, so every byte pulled off the wire duringmultipart parsing was silently dropped by the accounter.
Wrap the two
recv_bodycalls inread_with_boundarywithACCOUNTING_IO(s)->set_account(true/false), mirroring the PUT pattern inRGWPutObj_ObjStore::get_data. POST uploads now account correctly; PUTbehavior is unchanged.
Tracker: https://tracker.ceph.com/issues/76626
Checklist