]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crush: remove invalid upmap items 30899/head
authorhuangjun <huangjun@xsky.com>
Thu, 24 Oct 2019 15:44:12 +0000 (23:44 +0800)
committerNathan Cutler <ncutler@suse.com>
Thu, 7 Nov 2019 17:24:10 +0000 (18:24 +0100)
commitd6b3025a279c3876df035b02c7b8ec13e0590d7f
tree031c1a921db27c4a2de49ab26a4aa7d70e4435ff
parent9dff01ddb66f64cf2153c5875e80ea54618740de
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>
(cherry picked from commit 712a39e5c9d9848f618ad55a768103d84c0a460f)
src/crush/CrushWrapper.cc
src/test/osd/TestOSDMap.cc