]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd/PeeringState: fix info.stats.up[acting] of splitting child 35559/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Sat, 13 Jun 2020 07:41:04 +0000 (15:41 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Sat, 13 Jun 2020 07:41:04 +0000 (15:41 +0800)
commitd4f9edceda89c9096b228cb3ef1581a2e20fe044
treefafa6471a9cc80326ea863b0468f54940dede93c
parent8e1737097002df71ac1212a41e3deb87eb47d9f7
osd/PeeringState: fix info.stats.up[acting] of splitting child

In general a splitting child should have the same CRUSH
mapping result with its parent at the initialization stage.
However, since luminous mgr/balancer may change existing PGs'
original CRUSH mappings by explictly generating some
pg_upmap_items and feeding them to pg_to_up_acting_osds(),
hence the inconsistency of 'ceph pg ls' command output, i.e.,
because child is now reporting its parent's up set ([2,4,3])
rather than its own ([1,4,3]), which are actually different:

1.3a active+clean 2020-05-21 16:16:33.011237     0'0    34:26 [2,4,3]          1 [2,4,3]              1

Fix by using child's own CRUSH mappings when filling in
the corresponding fields of info.stats (We already have that
kind of info in hand and it is accurate under all circumstances).

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/osd/PeeringState.cc