mirror of https://github.com/ceph/ceph-ansible.git
commit
78545adab5
|
@ -0,0 +1,8 @@
|
||||||
|
copy_admin_key: true
|
||||||
|
create_pools:
|
||||||
|
foo:
|
||||||
|
pg_num: 17
|
||||||
|
bar:
|
||||||
|
pg_num: 19
|
||||||
|
rgw_override_bucket_index_max_shards: 16
|
||||||
|
rgw_bucket_default_quota_max_objects: 1638400
|
|
@ -22,3 +22,5 @@ devices:
|
||||||
- /dev/sda
|
- /dev/sda
|
||||||
- /dev/sdb
|
- /dev/sdb
|
||||||
ceph_osd_docker_run_script_path: /var/tmp
|
ceph_osd_docker_run_script_path: /var/tmp
|
||||||
|
rgw_override_bucket_index_max_shards: 16
|
||||||
|
rgw_bucket_default_quota_max_objects: 1638400
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
import pytest
|
||||||
|
import json
|
||||||
|
|
||||||
|
|
||||||
|
class TestRGWs(object):
|
||||||
|
|
||||||
|
@pytest.mark.no_docker
|
||||||
|
def test_rgw_bucket_default_quota_is_set(self, node, File):
|
||||||
|
assert File(node["conf_path"]).contains("rgw override bucket index max shards")
|
||||||
|
assert File(node["conf_path"]).contains("rgw bucket default quota max objects")
|
||||||
|
|
||||||
|
@pytest.mark.no_docker
|
||||||
|
def test_rgw_bucket_default_quota_is_applied(self, node, Command):
|
||||||
|
radosgw_admin_cmd = "sudo radosgw-admin --cluster={} user create --uid=test --display-name Test".format(node["cluster_name"])
|
||||||
|
radosgw_admin_output = Command.check_output(radosgw_admin_cmd)
|
||||||
|
radosgw_admin_output_json = json.loads(radosgw_admin_output)
|
||||||
|
assert radosgw_admin_output_json["bucket_quota"]["enabled"] == True
|
||||||
|
assert radosgw_admin_output_json["bucket_quota"]["max_objects"] == 1638400
|
||||||
|
|
||||||
|
@pytest.mark.no_docker
|
||||||
|
def test_rgw_tuning_pools_are_set(self, node, Command):
|
||||||
|
cmd = "sudo ceph --cluster={} --connect-timeout 5 osd dump".format(node["cluster_name"])
|
||||||
|
output = Command.check_output(cmd)
|
||||||
|
pools = node["vars"]["create_pools"]
|
||||||
|
for pool_name, pg_num in pools.items():
|
||||||
|
assert pool_name in output
|
||||||
|
pg_num_str = "pg_num {pg_num}".format(pg_num = pg_num["pg_num"])
|
||||||
|
assert pg_num_str in output
|
|
@ -0,0 +1,8 @@
|
||||||
|
copy_admin_key: true
|
||||||
|
create_pools:
|
||||||
|
foo:
|
||||||
|
pg_num: 17
|
||||||
|
bar:
|
||||||
|
pg_num: 19
|
||||||
|
rgw_override_bucket_index_max_shards: 16
|
||||||
|
rgw_bucket_default_quota_max_objects: 1638400
|
Loading…
Reference in New Issue