]> git.apps.os.sepia.ceph.com Git - ceph-ci.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>
Fri, 12 Mar 2021 21:51:10 +0000 (21:51 +0000)
commite534ca5a0576241c4dade6e566acdd5729945f0a
treeb11d6b5c8b569f2d3a5c32f1fe276c1c896e9bf6
parent3313a8b651e049de38421e37fae390a90b212dc9
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>
src/osd/PeeringState.cc