Skip to content

pacific: osd/PeeringState: fix acting_set_writeable min_size check - #40759

Merged
yuriw merged 2 commits into
ceph:pacificfrom
smithfarm:wip-50154-pacific
Apr 26, 2021
Merged

yuriw merged 2 commits into
ceph:pacificfrom
smithfarm:wip-50154-pacific

Conversation

@smithfarm

Copy link
Copy Markdown
Contributor

acting has placeholders for ec, need to use actingset.

Signed-off-by: Samuel Just <[email protected]>
(cherry picked from commit 7b2e0f4)
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 <[email protected]>
(cherry picked from commit 642a1c1)
@smithfarm smithfarm added this to the pacific milestone Apr 10, 2021
@smithfarm smithfarm added the core label Apr 10, 2021
@smithfarm
smithfarm requested a review from athanatos April 10, 2021 18:09
@smithfarm

Copy link
Copy Markdown
Contributor Author

@athanatos Can you suggest how the second commit could be backported to {octopus,nautilus}? It's not clear to me.

@smithfarm

Copy link
Copy Markdown
Contributor Author

jenkins test docs

@athanatos

Copy link
Copy Markdown
Contributor

@smithfarm 95bec9 recently consolidated those calls to a single place -- fixing those calls individually would likely suffice. @ideepika Is there a version of the validation test you used we can backport as well to test it?

@smithfarm

Copy link
Copy Markdown
Contributor Author

@athanatos Thanks. I linked to your comment in the relevant backport issues so whoever takes them up will be able to benefit from your advice.

@smithfarm
smithfarm requested a review from a team April 14, 2021 12:58
@smithfarm
smithfarm requested review from a team as code owners April 14, 2021 12:58
@smithfarm
smithfarm requested review from aaSharma14 and callithea and removed request for a team April 14, 2021 12:58
@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@athanatos

Copy link
Copy Markdown
Contributor

This seems to have a bunch of extra commits in it now?

@smithfarm
smithfarm removed request for a team, aaSharma14 and callithea April 15, 2021 07:23
@smithfarm

Copy link
Copy Markdown
Contributor Author

@athanatos Yes, the current state can be ignored, I think. At some point, the extra commits will magically disappear :-)

@idryomov
idryomov changed the base branch from pacific to pacific-saved April 20, 2021 13:18
@idryomov
idryomov changed the base branch from pacific-saved to pacific April 20, 2021 13:18
@neha-ojha

Copy link
Copy Markdown
Member

jenkins test api

@neha-ojha

Copy link
Copy Markdown
Member

jenkins test docs

@yuriw
yuriw merged commit 4fa5167 into ceph:pacific Apr 26, 2021
@smithfarm
smithfarm deleted the wip-50154-pacific branch April 26, 2021 21:53
@ideepika

ideepika commented May 4, 2021

Copy link
Copy Markdown
Member

@smithfarm 95bec9 recently consolidated those calls to a single place -- fixing those calls individually would likely suffice. @ideepika Is there a version of the validation test you used we can backport as well to test it?

@athanatos will create backports for validation tests, sorry missed notification earlier

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