Kefu, can you please look into this issue (or re-assign as appropriate?)
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?
Looks good.
https://github.com/ceph/ceph/pull/7139
https://github.com/ceph/ceph/pull/7139 accepted upstream
Bara, i updated the "Doc Text" with some sample output if any rules are overlapped. does it make sense to you?
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
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