]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crush: remove invalid upmap items 31131/head
authorhuangjun <huangjun@xsky.com>
Thu, 24 Oct 2019 15:44:12 +0000 (23:44 +0800)
committerhuangjun <huangjun@xsky.com>
Thu, 24 Oct 2019 16:29:21 +0000 (00:29 +0800)
commit712a39e5c9d9848f618ad55a768103d84c0a460f
treef5c934fb15bd222fb3cc5db741426fdc76b6911b
parent8b56c456b58ba6c2cd6b05aa63dc44e43bce97bd
crush: remove invalid upmap items

We can not cancel in verify_upmap if remap an osd to different root bucket,

cluster topology:
osd.0 ~ osd.29 belongs to datacenter 1
osd30 ~ osd.59 belongs to datacenter 2
crush rule:
  take datacenter 1
  chooseleaf 2 host
  emit
  take datacenter 2
  chooseleaf 2 host
  emit
The pg's primary osd in datacenter 1.

We should cancel the pgid from upmap_items like below
1) from [26,12,54,46] to [30,12,54,46]
pg_upmap_items [26,30]

2) from [16,25,53,31] to [40,25,53,0]
pg_upmap_items [16,20,31,0]

Signed-off-by: huangjun <huangjun@xsky.com>
src/crush/CrushWrapper.cc
src/test/osd/TestOSDMap.cc