]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd/OSDMap: calc_pg_upmaps - restrict optimization to origin pools only
authorxie xingguo <xie.xingguo@zte.com.cn>
Sat, 23 Mar 2019 01:50:27 +0000 (09:50 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Mon, 25 Mar 2019 11:23:47 +0000 (19:23 +0800)
commit01e8e9482ce7194d347e02ef41acfa6d8d14f614
tree242f50922c93a3811f77dc945cfec27ae9f24afa
parentb2b08eac17d1ba26dc33a92c015a6f778e9552db
osd/OSDMap: calc_pg_upmaps - restrict optimization to origin pools only

The current implementation will try to cancel any pg_upmaps that
would otherwise re-map a PG out from an underfull osd, which is wrong,
e.g., because it could reliably fire the following assert:

src/osd/OSDMap.cc: 4405: FAILED assert(osd_weight.count(i.first))

Also it would not match the expectation if automatic balancing
has been strictly restricted to some specific pools by admin.

Fix by excluding any wild PG that does not belong to the origin pools
passed in when trying to do upmap/unmap.

Fixes: http://tracker.ceph.com/issues/38897
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/osd/OSDMap.cc
src/test/osd/TestOSDMap.cc