]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: add bucket size limit check to radosgw-admin 11796/head
authorMatt Benjamin <mbenjamin@redhat.com>
Sat, 5 Nov 2016 17:13:47 +0000 (13:13 -0400)
committerMatt Benjamin <mbenjamin@redhat.com>
Thu, 20 Apr 2017 15:22:50 +0000 (11:22 -0400)
commit7bc144ce36fedc16a3dedc54598b0d75fb8c68bc
tree4ac44fb4abf47584d9e23710dcaf1516c456ca4f
parentb4bd579fddf6bc7790886c7b72276c4d309fbfcc
rgw: add bucket size limit check to radosgw-admin

The change adds a new list of all buckets x all users, with
fields for bucket name, tenant name, current num_objects,
current num_shards, current objects per shard, and the
corresponding fill_status--the latter consisting of 'OK',
'WARN <n>%', or 'OVER <n>%.'

The warning check is relative to two new tunables.  The threshold
max objects per shard is set as rgw_bucket_safe_max_objects_per_shard,
which defaults to 100K.  The value rgw_bucket_warning_threshold is
a percent of the current safe max at which to warn (defaults to
90% of full).

From review:

* fix indentation (rgw_admin)
* if user a user_id is provided, check only buckets for that user
* update shard warn pct to be pct-of-fill (not 100 - pct-of-fill)
* print only buckets near or over per-shard limit, if --warnings-only
* s/bucket limitcheck/bucket limit check */
* sanity shard limit should be 90, not 10 (because that changed)
* fixes for memleaks and other points found by cbodley

Fixes: http://tracker.ceph.com/issues/17925
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
src/common/config_opts.h
src/rgw/rgw_admin.cc
src/rgw/rgw_bucket.cc
src/rgw/rgw_bucket.h
src/test/cli/radosgw-admin/help.t