Skip to content

osd/PeeringState: fix acting_set_writeable min_size check#40572

Merged
tchaikov merged 2 commits intoceph:masterfrom
athanatos:sjust/wip-48613
Apr 6, 2021
Merged

osd/PeeringState: fix acting_set_writeable min_size check#40572
tchaikov merged 2 commits intoceph:masterfrom
athanatos:sjust/wip-48613

Conversation

@athanatos
Copy link
Contributor

No description provided.

acting has placeholders for ec, need to use actingset.

Signed-off-by: Samuel Just <sjust@redhat.com>
@athanatos
Copy link
Contributor Author

I think this explains both https://tracker.ceph.com/issues/48613 and the original lrc problem https://tracker.ceph.com/issues/48417

@athanatos
Copy link
Contributor Author

Commit message has an explanation.

@athanatos
Copy link
Contributor Author

@ideepika Can you run this through the teuthology suite sequence you've been using to reproduce the original lrc problem?

@ideepika
Copy link
Member

ideepika commented Apr 5, 2021

@ideepika Can you run this through the teuthology suite sequence you've been using to reproduce the original lrc problem?

@athanatos this makes sense, will test them!

Copy link
Member

@gregsfortytwo gregsfortytwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@ideepika ideepika left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@neha-ojha neha-ojha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this makes a lot of sense

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>
@tchaikov tchaikov merged commit 4ae1ab9 into ceph:master Apr 6, 2021
dvanders added a commit to dvanders/ceph that referenced this pull request Jun 1, 2021
This is a nautilus only manual backport of
ceph#40572

which is itself composed of commits
7b2e0f4
642a1c1

The backport did not apply cleanly because these call have
been factored out into PeeringState.cc in octopus and newer.

The original callers have been fixed in PG.cc.

Fixes: https://tracker.ceph.com/issues/50153
Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
mkogan1 pushed a commit to mkogan1/ceph that referenced this pull request Apr 24, 2022
Fix backport of Greg's Farnum's PeeringState changes to correctly
arrive at the valid implementation, accounting for Dan van der Ster's
bugfix for this:

commit f3b15f1
Author: Dan van der Ster <daniel.vanderster@cern.ch>
Date:   Tue Jun 1 11:14:10 2021 +0200

    nautilus: osd/PeeringState: fix acting_set_writeable min_size check

    This is a nautilus only manual backport of
    ceph#40572

    which is itself composed of commits
    7b2e0f4
    642a1c1

    The backport did not apply cleanly because these call have
    been factored out into PeeringState.cc in octopus and newer.

    The original callers have been fixed in PG.cc.

    Fixes: https://tracker.ceph.com/issues/50153
    Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>

Cross checked with Greg, mistakes mine if any.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants