[rgw][hammer] quota. how it should work?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I'm trying to set up a bucket quotas in hammer and I don't get any errors using S3 API and ceph documentation, when I exceed the limit (of total count of objects in a bucket, of bucket size), so I've got questions:

There are two places, where I can configure quotas: user and bucket of this user. 

User:

# radosgw-admin user info --uid=6e4cc9e4-2262-4dc9-b3b5-f94c7878991c
{
    "user_id": "6e4cc9e4-2262-4dc9-b3b5-f94c7878991c",
    "display_name": "user@xxxxxxxxxxxxx",
    "email": "",
    "suspended": 0,
    "max_buckets": 100000,
    "auid": 0,
    "subusers": [],
    "keys": [
        {
            "user": "6e4cc9e4-2262-4dc9-b3b5-f94c7878991c",
            "access_key": "user:user@xxxxxxxxxxxxx",
            "secret_key": "key"
        }
    ],
    "swift_keys": [],
    "caps": [],
    "op_mask": "read, write, delete",
    "default_placement": "",
    "placement_tags": [],
    "bucket_quota": {
        "enabled": true,
        "max_size_kb": 2,
        "max_objects": -1
    },
    "user_quota": {
        "enabled": false,
        "max_size_kb": -1,
        "max_objects": -1
    },
    "temp_url_keys": []
}

# radosgw-admin bucket stats --bucket=eee
{
    "bucket": "eee",
    "pool": ".rgw.buckets",
    "index_pool": ".rgw.buckets.index",
    "id": "default.4554.5",
    "marker": "default.4554.5",
    "owner": "6e4cc9e4-2262-4dc9-b3b5-f94c7878991c",
    "ver": "0#1",
    "master_ver": "0#0",
    "mtime": "2016-02-05 10:05:41.000000",
    "max_marker": "0#",
    "usage": {},
    "bucket_quota": {
        "enabled": false,
        "max_size_kb": -1,
        "max_objects": -1
    }
}


Well, in user object bucket_quota is enabled and limited to 2 kb, but in bucket object bucket_quota is disabled. Which quota is respectable?
I will not be rejected if I put in bucket of this user object larger, then the quota.

I POSTed 5kb object to this bucket without any problems:
# radosgw-admin bucket stats --bucket=eee
{
    "bucket": "eee",
    "pool": ".rgw.buckets",
    "index_pool": ".rgw.buckets.index",
    "id": "default.4554.5",
    "marker": "default.4554.5",
    "owner": "6e4cc9e4-2262-4dc9-b3b5-f94c7878991c",
    "ver": "0#3",
    "master_ver": "0#0",
    "mtime": "2016-02-05 10:05:41.000000",
    "max_marker": "0#",
    "usage": {
        "rgw.main": {
            "size_kb": 5,
            "size_kb_actual": 8,
            "num_objects": 1
        }
    },
    "bucket_quota": {
        "enabled": false,
        "max_size_kb": -1,
        "max_objects": -1
    }
}

Now, I'm trying to set quota on bucket and empty the bucket:

# radosgw-admin quota set --bucket=eee --max-size=2048
# radosgw-admin quota enable --bucket=eee
# radosgw-admin bucket stats --bucket=eee
{
    "bucket": "eee",
    "pool": ".rgw.buckets",
    "index_pool": ".rgw.buckets.index",
    "id": "default.4554.5",
    "marker": "default.4554.5",
    "owner": "6e4cc9e4-2262-4dc9-b3b5-f94c7878991c",
    "ver": "0#5",
    "master_ver": "0#0",
    "mtime": "2016-02-05 10:13:02.000000",
    "max_marker": "0#",
    "usage": {
        "rgw.main": {
            "size_kb": 0,
            "size_kb_actual": 0,
            "num_objects": 0
        }
    },
    "bucket_quota": {
        "enabled": true,
        "max_size_kb": 2,
        "max_objects": -1
    }
}

POSTing 5 kb object, and it again works.

af27: ==> /var/log/httpd/rgw-ssl-access.log <==
af27: 172.20.33.121 - - [05/Feb/2016:10:18:39 +0300] "POST /eee HTTP/1.1" 204 - "https://console.c2.croc.ru/storage"; "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.97 Safari/537.36"

# radosgw-admin bucket stats --bucket=eee
{
    "bucket": "eee",
    "pool": ".rgw.buckets",
    "index_pool": ".rgw.buckets.index",
    "id": "default.4554.5",
    "marker": "default.4554.5",
    "owner": "6e4cc9e4-2262-4dc9-b3b5-f94c7878991c",
    "ver": "0#7",
    "master_ver": "0#0",
    "mtime": "2016-02-05 10:13:02.000000",
    "max_marker": "0#",
    "usage": {
        "rgw.main": {
            "size_kb": 5,
            "size_kb_actual": 8,
            "num_objects": 1
        }
    },
    "bucket_quota": {
        "enabled": true,
        "max_size_kb": 2,
        "max_objects": -1
    }
}


What am I doing wrong?
Or, maybe there's a bug? I'm using 0.94.5 version of ceph, rhel 6.6.
There was a bug, but it seems to be fixed:
http://tracker.ceph.com/issues/11727

Thanks for any thoughts.

--- 
Regards,
 
Vladislav Odintsov
System Engineer of Croc Cloud Development Team
 
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com



[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux