Bug 1391650

Summary: [RFE] [RGW] radosgw-admin bucket quota warning
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Matt Benjamin (redhat) <mbenjamin>
Component: RGWAssignee: Matt Benjamin (redhat) <mbenjamin>
Status: CLOSED ERRATA QA Contact: Parikshith <pbyregow>
Severity: high Docs Contact: Erin Donnelly <edonnell>
Priority: unspecified    
Version: 2.1CC: cbodley, ceph-eng-bugs, edonnell, hnallurv, kbader, kdreyer, mbenjamin, nlevine, owasserm, sweil, tserlin, uboppana
Target Milestone: rcKeywords: FutureFeature
Target Release: 2.3   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: RHEL: ceph-10.2.7-22.el7cp Ubuntu: ceph_10.2.7-24redhat1 Doc Type: Enhancement
Doc Text:
.The radosgw-admin utility supports a new bucket limitcheck command The `radosgw-admin` utility has a new command `bucket limitcheck` to warn the administrator when a bucket needs resharding. Previously, buckets with more objects than is recommended could be unnoticed and cause performance issues. This new command reports on bucket status with respect to the configured bucket sharding recommendations ensuring that administrators can detect overloaded buckets easily.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-19 13:27:19 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:
Bug Depends On:    
Bug Blocks: 1437916    

Description Matt Benjamin (redhat) 2016-11-03 16:43:06 UTC
Description of problem:

RGW should generate warnings when buckets are in danger exceeding the same maximum number of entries per index shard (appx. 100000, for buckets with indexes)

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

Actual results:
No comparable feature exists.


Expected results:
We propose to address the issue by providing a new radosgw-admin sub-command which scans existing, indexed buckets and reports on those which have exceeded or have approached within a defined percentage (default 10%) of the safe maximum entry limit of 100K per index shard.

Additional info:
None

Comment 6 Matt Benjamin (redhat) 2016-11-05 20:49:05 UTC
Proposed upstream PR:
https://github.com/ceph/ceph/pull/11796

Comment 11 Ken Dreyer (Red Hat) 2017-04-07 18:18:09 UTC
Matt would you please rebase the PR at https://github.com/ceph/ceph/pull/11796 so we can get this upstream?

Comment 12 Matt Benjamin (redhat) 2017-04-19 20:08:34 UTC
(In reply to Ken Dreyer (Red Hat) from comment #11)
> Matt would you please rebase the PR at
> https://github.com/ceph/ceph/pull/11796 so we can get this upstream?

@ken, rebased last week, I asked Casey to re-review.

Matt

Comment 34 Parikshith 2017-06-01 06:08:37 UTC
Made the changes. Verified with 5 different buckets with varying objects.
Warning messages are displayed as per the configuration set.

rgw_override_bucket_index_max_shards = 10 
rgw_safe_max_objects_per_shard = 1000

radosgw-admin bucket limit check --warnings-only
[
    {
        "user_id": "johndoe",
        "buckets": [
            {
                "bucket": "general_2_3_10000",
                "tenant": "",
                "num_objects": 10000,
                "num_shards": 10,
                "objects_per_shard": 1000,
                "fill_status": "WARN 100.000000%"
            },
            {
                "bucket": "general_2_3_20000",
                "tenant": "",
                "num_objects": 20000,
                "num_shards": 10,
                "objects_per_shard": 2000,
                "fill_status": "OVER 100.000000%"
            }
        ]
    }
]

Comment 36 errata-xmlrpc 2017-06-19 13:27:19 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/RHBA-2017:1497