Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osd/scrub: verify SnapMapper consistency #47388

Merged
merged 5 commits into from
Sep 2, 2022
Merged

Conversation

ronen-fr
Copy link
Contributor

@ronen-fr ronen-fr commented Aug 1, 2022

Whenever the scrubber accesses the SnapMapper for the snaps of a specific
clone, the mapper will now verify that the snaps have the required
mapping DB entries (the 'SNA_' keys).

Signed-off-by: Ronen Friedman rfriedma@redhat.com

Copy link
Contributor

@Matan-B Matan-B left a comment

Choose a reason for hiding this comment

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

Looking good! left a few comments.
Might be worth to add a simple test.

src/osd/SnapMapper.cc Outdated Show resolved Hide resolved
src/osd/mapper_access.h Outdated Show resolved Hide resolved
src/osd/mapper_access.h Outdated Show resolved Hide resolved
src/osd/mapper_access.h Outdated Show resolved Hide resolved
src/osd/scrubber/scrub_backend.cc Outdated Show resolved Hide resolved
@ronen-fr ronen-fr force-pushed the wip-rf-snapper branch 3 times, most recently from 6652b79 to 7b7ece5 Compare August 1, 2022 15:37
Copy link
Contributor

@athanatos athanatos left a comment

Choose a reason for hiding this comment

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

Seems to be heading in the right direction.

We have tests that inject errors and validate the scrub behaves correctly. We need to add these scenarios to those tests. Particularly, we want a test scenario that does a good job of mimicing the SNA_ removal upgrade bug situation.

src/osd/SnapMapper.cc Outdated Show resolved Hide resolved
src/osd/SnapMapper.cc Show resolved Hide resolved
src/osd/SnapMapper.cc Outdated Show resolved Hide resolved
src/osd/mapper_access.h Outdated Show resolved Hide resolved
src/osd/SnapMapper.cc Outdated Show resolved Hide resolved
src/osd/SnapMapper.h Outdated Show resolved Hide resolved
src/osd/SnapMapper.h Outdated Show resolved Hide resolved
src/osd/scrubber/scrub_backend.cc Outdated Show resolved Hide resolved
src/osd/scrubber/scrub_backend.cc Outdated Show resolved Hide resolved
src/osd/scrubber/scrub_backend.cc Outdated Show resolved Hide resolved
@ronen-fr ronen-fr marked this pull request as draft August 2, 2022 11:33
@ronen-fr ronen-fr force-pushed the wip-rf-snapper branch 10 times, most recently from 3269d12 to 3d50361 Compare August 9, 2022 11:55
@ronen-fr ronen-fr marked this pull request as ready for review August 9, 2022 11:56
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
Whenever the scrubber access the SnapMapper for the snaps of a specific
clone, the mapper will now verify that the snaps have the required
mapping DB entries (the 'SNA_' keys).

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
The test (in the standalone/scrub suite) verifies that the scrubber
detects (and issues a cluster-log error) whenever a mapping entry
("SNA_") is missing in the SnapMapper DB.

Specifically, here the entry is corrupted - shortened as per
https://tracker.ceph.com/issues/56147.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
... systematically, over ceph::bufferlist.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
@ronen-fr
Copy link
Contributor Author

ronen-fr commented Sep 2, 2022

jenkins retest this please

1 similar comment
@ronen-fr
Copy link
Contributor Author

ronen-fr commented Sep 2, 2022

jenkins retest this please

@ronen-fr
Copy link
Contributor Author

ronen-fr commented Sep 2, 2022

Merging based on Teu results (see above)

@ronen-fr ronen-fr merged commit a4f3561 into ceph:main Sep 2, 2022
@wvh-github
Copy link

It looks like this never got backported to any release. Am I correct, and if so shouldn't it be?

ronen-fr added a commit to ronen-fr/ceph that referenced this pull request Jun 25, 2023
A manual backport of the relevant changes introduced in
PR ceph#47388 (osd/scrub: verify SnapMapper consistency)

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
ronen-fr added a commit to ronen-fr/ceph that referenced this pull request Jun 25, 2023
encountered when manually backporting PR ceph#47388.
Mostly fmtlib-related.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
ronen-fr added a commit to ronen-fr/ceph that referenced this pull request Jun 25, 2023
updating the standalone tests to match the exact format of
some log lines.

A manual backport of PR ceph#47388.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
ronen-fr added a commit to ronen-fr/ceph that referenced this pull request Jun 25, 2023
A manual backport of the relevant changes introduced in
PR ceph#47388 (osd/scrub: verify SnapMapper consistency)

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
ronen-fr added a commit to ronen-fr/ceph that referenced this pull request Jun 25, 2023
updating the standalone tests to match the exact format of
some log lines.

A manual backport of PR ceph#47388.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
ronen-fr added a commit to ronen-fr/ceph that referenced this pull request Jun 25, 2023
A manual backport of the relevant changes introduced in
PR ceph#47388 (osd/scrub: verify SnapMapper consistency)

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
ronen-fr added a commit to ronen-fr/ceph that referenced this pull request Jun 25, 2023
updating the standalone tests to match the exact format of
some log lines.

A manual backport of PR ceph#47388.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
ronen-fr added a commit to ronen-fr/ceph that referenced this pull request Jun 25, 2023
A manual backport of the relevant changes introduced in
PR ceph#47388 (osd/scrub: verify SnapMapper consistency)

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
ronen-fr added a commit to ronen-fr/ceph that referenced this pull request Jun 25, 2023
updating the standalone tests to match the exact format of
some log lines.

A manual backport of PR ceph#47388.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
ronen-fr added a commit to ronen-fr/ceph that referenced this pull request Jun 25, 2023
A manual backport of the relevant changes introduced in
PR ceph#47388 (osd/scrub: verify SnapMapper consistency)

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
ronen-fr added a commit to ronen-fr/ceph that referenced this pull request Jun 25, 2023
The test (in the standalone/scrub suite) verifies that the scrubber
detects (and issues a cluster-log error) whenever a mapping entry
("SNA_") is missing in the SnapMapper DB.

Specifically, here the entry is corrupted - shortened as per
https://tracker.ceph.com/issues/56147.

A manual backport of PR ceph#47388.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
ronen-fr added a commit to ronen-fr/ceph that referenced this pull request Jun 25, 2023
encountered when manually backporting PR ceph#47388.
Mostly fmtlib-related. Probably related to installed
FMT-lib version.

All changes copied from 'main'.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
ronen-fr added a commit to ronen-fr/ceph that referenced this pull request Jun 25, 2023
updating the standalone tests to match the exact format of
some log lines.

A manual backport of PR ceph#47388.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
ronen-fr added a commit to ronen-fr/ceph that referenced this pull request Jun 25, 2023
A manual backport of the relevant changes introduced in
PR ceph#47388 (osd/scrub: verify SnapMapper consistency)

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
ronen-fr added a commit to ronen-fr/ceph that referenced this pull request Jun 25, 2023
The test (in the standalone/scrub suite) verifies that the scrubber
detects (and issues a cluster-log error) whenever a mapping entry
("SNA_") is missing in the SnapMapper DB.

Specifically, here the entry is corrupted - shortened as per
https://tracker.ceph.com/issues/56147.

A manual backport of PR ceph#47388.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
ronen-fr added a commit to ronen-fr/ceph that referenced this pull request Jun 28, 2023
encountered when manually backporting PR ceph#47388.
Mostly fmtlib-related. Probably related to installed
FMT-lib version.

All changes copied from 'main'.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
ronen-fr added a commit to ronen-fr/ceph that referenced this pull request Jun 29, 2023
encountered when manually backporting PR ceph#47388.
Mostly fmtlib-related. Probably related to installed
FMT-lib version.

All changes copied from 'main'.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
ronen-fr added a commit to ronen-fr/ceph that referenced this pull request Jun 29, 2023
encountered when manually backporting PR ceph#47388.
Mostly fmtlib-related. Probably related to installed
FMT-lib version.

All changes copied from 'main'.

Signed-off-by: Ronen Friedman <rfriedma@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.

4 participants