]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd: PeeringState: fix stretch peering so PGs can go peered but not active
authorGreg Farnum <gfarnum@redhat.com>
Fri, 12 Mar 2021 20:13:38 +0000 (20:13 +0000)
committerGreg Farnum <gfarnum@redhat.com>
Mon, 15 Mar 2021 18:38:52 +0000 (18:38 +0000)
commitfe009e79e9c6aa166b8ecd921b0b12fa05bd2527
treebf4541fd16209bc9d86f0c546259b5c01f847aa2
parent68e344ee6c76f336b522e012f1365f9521b48f67
osd: PeeringState: fix stretch peering so PGs can go peered but not active

I misunderstood and there was a pretty serious error here: to prevent
accidents, choose_acting() was preventing PGs from *finishing* peering
if they didn't satisfy the stretch cluster rules. What we actually want
to do is to finish peering, but not go active.

Happily, this is easy to fix -- we just add a call to stretch_set_can_peer()
alongside existing min_size checks when we choose whether to go PG_STATE_ACTIVE
or PG_STATE_PEERED!

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit e534ca5a0576241c4dade6e566acdd5729945f0a)
src/osd/PeeringState.cc