]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crush: remove invalid upmap items 32099/head
authorhuangjun <huangjun@xsky.com>
Thu, 24 Oct 2019 15:44:12 +0000 (23:44 +0800)
committerhuangjun <huangjun@xsky.com>
Sat, 7 Dec 2019 07:08:49 +0000 (15:08 +0800)
commit55ed94a345b968adf2a0a7bf9519568d9c2df488
tree496813e01a3cd4d655c5a6f6b5515952fe2d51ad
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]

Fixes: https://tracker.ceph.com/issues/42485
Fixes: https://tracker.ceph.com/issues/43124
Signed-off-by: huangjun <huangjun@xsky.com>
src/crush/CrushWrapper.cc
src/test/osd/TestOSDMap.cc