]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crush: add root_bucket to identify underfull buckets
authorhuangjun <huangjun@xsky.com>
Wed, 20 Mar 2019 08:44:02 +0000 (16:44 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Thu, 28 Mar 2019 01:48:04 +0000 (09:48 +0800)
commit5c173a0e65dc9eaca6e95b600270eaf2394b48eb
treed832ba4c5662324670d9ae14c39fb90badc69f2a
parent520f7c07c160ad2e54e6cc46a8429c53d9682e20
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