Bug 1386179

Summary: [RGW] - max_size_kb incorrectly displayed in user info when maximum quota set is less than 1K
Product: Red Hat Ceph Storage Reporter: Vasishta <vashastr>
Component: RGWAssignee: Matt Benjamin (redhat) <mbenjamin>
Status: CLOSED NOTABUG QA Contact: ceph-qe-bugs <ceph-qe-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 2.1CC: cbodley, ceph-eng-bugs, hnallurv, kbader, mbenjamin, owasserm, sweil, tserlin, yehuda
Target Milestone: rcFlags: tserlin: needinfo? (hnallurv)
Target Release: 2.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-11 15:30:13 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:

Description Vasishta 2016-10-18 10:56:55 UTC
Description of problem:
Even when User quota is set less than 1K, user info displays 1K

Version-Release number of selected component (if applicable):
ceph version 10.2.3-8.el7cp

How reproducible:
Always

Steps to Reproduce:
1.Set user quota to 1B
$sudo radosgw-admin quota enable --quota-scope=user --uid=redhat2
$sudo radosgw-admin quota set --quota-scope=user --uid=redhat2 --max-size=1B

2.Display user info
$sudo radosgw-admin user info --uid=redhat2


Actual results:
{
    "user_id": "redhat2",
    "display_name": "redhat2",
    "email": "",
    "suspended": 0,
    "max_buckets": 1000,
    "auid": 0,
    "subusers": [],
    "keys": [
        {
            "user": "redhat2",
            "access_key": "M5DXBUYGGMPRSHYPN5O6",
            "secret_key": "K7FpRDoWAwCl0QBwnPBJDODaQwnsD8GqeDipCCJb"
        }
    ],
    "swift_keys": [],
    "caps": [],
    "op_mask": "read, write, delete",
    "default_placement": "",
    "placement_tags": [],
    "bucket_quota": {
        "enabled": false,
        "max_size_kb": -1,
        "max_objects": -1
    },
    "user_quota": {
        "enabled": true,
        "max_size_kb": 1,
        "max_objects": -1
    },
    "temp_url_keys": []
}



Expected results:
max_size_kb in user_quota should not be 1 as it has been set to 1B

Additional info: