Bug 1289658 - [RFE] crushtool should check for duplicated ruleset id
[RFE] crushtool should check for duplicated ruleset id
Status: CLOSED ERRATA
Product: Red Hat Ceph Storage
Classification: Red Hat
Component: RADOS (Show other bugs)
1.3.0
Unspecified Unspecified
unspecified Severity unspecified
: rc
: 2.0
Assigned To: Kefu Chai
Rachana Patel
Bara Ancincova
: FutureFeature
Depends On:
Blocks: 1322504
  Show dependency treegraph
 
Reported: 2015-12-08 11:32 EST by Alexandre Marangone
Modified: 2017-07-30 11:09 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
.`crushtool` now checks for overlapping CRUSH rules The `crushtool` now checks if the CRUSH rules overlap. To check if the CRUSH rules overlap, use the following command. If `crushtool` finds any overlapping rules, it outputs them: ---- $ crushtool --check -i <crush_file> overlapped rules in ruleset 0: rule-r0, rule-r1, rule-r2 ----
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-08-23 15:28:56 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Comment 2 Ken Dreyer (Red Hat) 2015-12-08 11:58:02 EST
Kefu, can you please look into this issue (or re-assign as appropriate?)
Comment 6 Kefu Chai 2016-01-06 00:02:53 EST
as Sam put, it's not entirely a bug. see http://docs.ceph.com/docs/master/rados/operations/crush-map/#crush-map-rules. but we can surely detect the ambiguous case where CRUSH could choose multiple rules from a given ruleset for a given pool.

but i'd like put this feature into crushtool:

$ crushtool --check -i <crush_file>

overlapped rules: replicated_rule0, replicated_rule1
overlapped rules: replicated_rule0, replicated_rule2

if we feed following rules to crushtool:

rule replicated_rule0 {
        ruleset 0
        type replicated
        min_size 1
        max_size 3
        step take default
        step chooseleaf firstn 0 type osd
        step emit
}

rule replicated_rule1 {
        ruleset 0
        type replicated
        min_size 1
        max_size 1
        step take default
        step chooseleaf firstn 0 type host
        step emit
}

rule replicated_rule2 {
        ruleset 0
        type replicated
        min_size 2
        max_size 3
        step take default
        step chooseleaf firstn 0 type host
        step emit
}


what do you think?
Comment 7 Alexandre Marangone 2016-01-06 09:08:26 EST
Looks good.
Comment 8 Kefu Chai 2016-01-07 05:18:30 EST
https://github.com/ceph/ceph/pull/7139
Comment 9 Ken Dreyer (Red Hat) 2016-02-29 17:19:39 EST
https://github.com/ceph/ceph/pull/7139 accepted upstream
Comment 12 Kefu Chai 2016-06-08 01:43:24 EDT
Bara, i updated the "Doc Text" with some sample output if any rules are overlapped. does it make sense to you?
Comment 14 Rachana Patel 2016-06-13 17:48:36 EDT
Verified with - 10.2.1-12.el7cp.x86_64



[root@magna051 ubuntu]# crushtool -i  "/tmp/cm.new" --check
overlapped rules in ruleset 0: replicated_rule0, replicated_rule1, replicated_ruleset
overlapped rules in ruleset 0: replicated_rule0, replicated_rule2, replicated_ruleset
[root@magna051 ubuntu]# crushtool -i  "/tmp/cm" --check

Works as expected hence moving to Verified
Comment 16 errata-xmlrpc 2016-08-23 15:28:56 EDT
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-2016:1755

Note You need to log in before you can comment on or make changes to this bug.