]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd/PeeringState: fix acting_set_writeable min_size check 40759/head
authorSamuel Just <sjust@redhat.com>
Fri, 2 Apr 2021 22:30:54 +0000 (22:30 +0000)
committerNathan Cutler <ncutler@suse.com>
Sat, 10 Apr 2021 18:09:04 +0000 (20:09 +0200)
commite2f815cd17683a108cd093200a8ac52bf92f3ce5
tree0b139babe29610640caebf5b79ebe4464d642a44
parent2a61a39d4c3f268ee4919607ac8a4edc5984a9e9
osd/PeeringState: fix acting_set_writeable min_size check

acting.size() >= pool.info.min_size is meant to check min_size against
acting set participants, but acting is a vector with placeholders.
actingset is the representation with placeholders removed.

The upshot of this bug is that the activation process will basically
ignore min_size for an ec pool allowing writes in cases where it
shouldn't.  PastIntervals::check_new_interval, however, performs
the check correctly, and will therefore discount intervals in which
we really did serve writes as not writeable.  This can trigger many
different problem conditions including but not limited to:
  - Unfound objects due to accepting a last_update with insufficient
    osds
  - Lost writes
  - Crashes due to peering rules being violated

This bug was originally introduced with recovery below min_size in
e5a96fd, and then preserved through refactors in 749a13d and 95bec9.

7cb818a exposed it with with expansion of recovery below min_size
to include ec pools (acting.size() is sufficient for replicated
pools).

Fixes: https://tracker.ceph.com/issues/48613
Fixes: https://tracker.ceph.com/issues/48417
Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit 642a1c165499bcbd4cfdf907af313ac7ffe44ff4)
src/osd/PeeringState.h