Repository navigation
quincy: librbd: disallow group snap rollback if memberships don't match - #58208
Merged
Merged
Conversation
Contributor
Author
|
jenkins test make check |
ajarr
approved these changes
Jun 24, 2024
Contributor
Author
|
Appended backport of #58300. |
Contributor
Author
|
jenkins test make check |
idryomov
force-pushed
the
wip-66300-quincy
branch
from
July 8, 2024 14:23
a44b3ec to
df42842
Compare
Contributor
Author
|
Pushed a fixup for failures. It slipped because #57954 is being backported only to squid. |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
The rollback assert doesn't really test anything -- because orig_data and test_data are written to non-overlapping areas, the test would pass even if rbd_group_snap_rollback() does nothing (i.e. rollback isn't performed) as long as the call returns 0. Signed-off-by: Ilya Dryomov <[email protected]> (cherry picked from commit b3977c5)
After the rollback assert in TestGroup.add_snapshot{,PP} was made
meaningful in the previous commit, it fails in mock tests which means
that rollback has never been exercised properly...
While I confess to not following file->snap_id == CEPH_NOSNAP branch
especially given how file variable is shadowed, it's pretty clear that
get_snap_read() doesn't belong here -- the snapshot selected for reads
has nothing to do with rollback. Replacing it with the rollback snap
ID makes sense of the other branches and makes the tests in question
pass.
Signed-off-by: Ilya Dryomov <[email protected]>
(cherry picked from commit 91a0632)
Before proceeding with group rollback, ensure that the set of images that took part in the group snapshot matches the set of images that are currently part of the group. Otherwise, because we preserve affected snapshots when an image is removed from the group, data loss can ensue where an image gets rolled back while part of another group or not part of any group but long repurposed for something else. Similarly, ensure that the group snapshot is complete. Fixes: https://tracker.ceph.com/issues/66300 Signed-off-by: Ilya Dryomov <[email protected]> (cherry picked from commit f212a9c) Conflicts: src/cls/rbd/cls_rbd_types.h [ provide operator== for GroupImageSpec manually since quincy is on C++17 ] src/test/pybind/test_rbd.py [ commit d7fd66e ("librbd: add rbd_clone4() API to take parent snapshot by ID") not in quincy ]
Signed-off-by: Ilya Dryomov <[email protected]> (cherry picked from commit afbb744)
Signed-off-by: Ilya Dryomov <[email protected]> (cherry picked from commit db52fca)
Otherwise, a failing add_snapshot test causes add_snapshotPP test to fail too, for example. Signed-off-by: Ilya Dryomov <[email protected]> (cherry picked from commit 4c69370)
After rollback started being tested in commit b3977c5 ("test/librbd: make rollback in TestGroup.add_snapshot{,PP} meaningful"), these tests can fail on comparing post-rollback data to expected data if run with exclusive lock disabled. This doesn't occur with exclusive lock enabled because the RBD cache gets invalidated implicitly before releasing the lock. While at it, pass LIBRADOS_OP_FLAG_FADVISE_FUA to avoid relying on any cache settings that happen to be in effect. Signed-off-by: Ilya Dryomov <[email protected]> (cherry picked from commit a7e314c)
idryomov
force-pushed
the
wip-66300-quincy
branch
from
July 12, 2024 21:22
df42842 to
0fd5a68
Compare
Contributor
Author
|
jenkins test make check |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
backport tracker: https://tracker.ceph.com/issues/66590
backport of #58074 and #58300
parent tracker: https://tracker.ceph.com/issues/66300