Bug 1235845

Summary: rgw: usage reporting with civetweb doesn't reflect partial download
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Yehuda Sadeh <yehuda>
Component: RGWAssignee: Yehuda Sadeh <yehuda>
Status: CLOSED ERRATA QA Contact: ceph-qe-bugs <ceph-qe-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 1.3.0CC: cbodley, ceph-eng-bugs, ceph-qe-bugs, flucifre, kbader, kdreyer, mbenjamin, owasserm, smanjara, sweil, tmuthami
Target Milestone: rc   
Target Release: 1.3.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-0.94.2-3.el7cp Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-23 20:21:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Yehuda Sadeh 2015-06-25 21:41:22 UTC
Description of problem:

When using civetweb, the usage logging is always reporting the full object size downloaded, even though the download was aborted in the middle.


Version-Release number of selected component (if applicable):


How reproducible:
always


Steps to Reproduce:
1. Configure rgw with civetweb
2. Turn on usage logging
3. Upload large object
4. Trim usage log
5. Start downloading object, abort after start
6. Wait for usage info to be flushed (30 seconds by default)
7. Inspect usage

Actual results:
Usage will show complete object size

Expected results:
Usage should only show partial object size


Additional info:

Comment 2 Yehuda Sadeh 2015-06-30 17:50:56 UTC
need qa_ack

Comment 3 Ken Dreyer (Red Hat) 2015-07-15 01:36:18 UTC
merged to master upstream, not yet backported to hammer (should be in v0.94.3 or v0.94.4)

Comment 6 shilpa 2015-10-22 12:33:02 UTC
Verified in ceph-0.94.3-1.el7cp.x86_64

Enabled usage log. Uploaded an object of ~147M. Trimmed the log and started the download. Aborted the download before it finished to get a partial object. 

Usage when object is uploaded:

 "total": {
                "bytes_sent": 153464191,
                "bytes_received": 0,
                "ops": 3,
                "successful_ops": 3
            }


After partial download:

 "total": {
                "bytes_sent": 95746687,
                "bytes_received": 0,
                "ops": 3,
                "successful_ops": 2
            }

Shows partial object size.

Comment 8 errata-xmlrpc 2015-11-23 20:21:39 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2015:2512

Comment 9 Siddharth Sharma 2015-11-23 21:53:26 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2015:2066