squid: rbd-mirror: prevent image deletion if remote image is not primary#64739
Merged
yuriw merged 2 commits intoceph:squidfrom Oct 2, 2025
Merged
squid: rbd-mirror: prevent image deletion if remote image is not primary#64739yuriw merged 2 commits intoceph:squidfrom
yuriw merged 2 commits intoceph:squidfrom
Conversation
Contributor
|
Appended #64757 (unit test fixup). |
idryomov
approved these changes
Aug 1, 2025
|
@yuriw can you please take this PR testing for your any |
idryomov
requested changes
Sep 22, 2025
A resync on a mirrored image may incorrectly results in the local image being deleted even when the remote image is no longer primary. This issue can occur under the following conditions: * if resync is requested on the secondary before the remote image has been fully demoted * if the demotion of the primary image is not mirrored due to the rbd-mirror daemon being offline. This can be fixed by ensuring that image deletion during a resync is only allowed when the remote image is confirmed to be primary. This commit fixes the issue only for snapshot based mirroring mode Fixes: https://tracker.ceph.com/issues/70948 Signed-off-by: VinayBhaskar-V <vvarada@redhat.com> (cherry picked from commit e14afbc)
Adjust the wait_for_notification call in TestMockImageReplayerSnapshotReplayer.ResyncRequestedRemoteNotPrimary to expect 2 notifications instead of 1. This allows the test to correctly wait for both expected events i.e for finish_sync() and handle_replay_complete(locker, -EREMOTEIO, "remote image demoted"), ensuring the replayer transitions to STATE_COMPLETE and is_replaying() returns false as intended. Fixes: https://tracker.ceph.com/issues/72325 Signed-off-by: VinayBhaskar-V <vvarada@redhat.com> (cherry picked from commit b5a013f)
ed6f804 to
6ee6ab7
Compare
idryomov
approved these changes
Sep 23, 2025
Contributor
Author
|
jenkins test api |
Contributor
Author
|
jenkins test make check |
Contributor
|
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/72319
backport of #63270 and #64757
parent tracker: https://tracker.ceph.com/issues/70948
this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/main/src/script/ceph-backport.sh