]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crush: add root_bucket to identify underfull buckets 27257/head
authorhuangjun <huangjun@xsky.com>
Wed, 20 Mar 2019 08:44:02 +0000 (16:44 +0800)
committerPrashant D <pdhange@redhat.com>
Fri, 29 Mar 2019 03:08:17 +0000 (23:08 -0400)
commit94168dcfa32f9c1d95e25c0cf228781b69c900a0
tree9cd2721e83ecb85f25109ef9b9d2d316d7ca34bb
parent6688405992e0c0ceb19c0bb10d79bdd58723321d
crush: add root_bucket to identify underfull buckets

All underfull buckets under root_buckets will be taken as target

For the crule rule:
    step take datacenter0
    step chooseleaf firstn 2 type host
    step emit
    step take datacenter1
    step chooseleaf firstn 2 type host
    step emit

If one host contains overfull osd but no underfull osd,
it will use other underfull buckets as target, which
maybe not in the same datacenter, that will
broke the rule.

Fixes: http://tracker.ceph.com/issues/38826
Signed-off-by: huangjun <huangjun@xsky.com>
(cherry picked from commit 3d5678d3561d90a10d9de3cb6e7e0405dbe8fdfe)
src/crush/CrushWrapper.cc
src/crush/CrushWrapper.h