Repository navigation
tentacle: RGW/multisite: fix bucket-full-sync infinite loop caused by stale bucket_list_result reuse - #67923
Merged
Conversation
The original SSTR macro defined a local variable `std::stringstream ss`
inside its expansion. When an expression that used a variable named `ss`
is passed to this macro, it led to name shadowing and unexpected results.
Example:
std::stringstream ss;
ss << "aaa";
auto result = SSTR("this is ss=" << ss.str());
Actual result:
"this is ss=this is ss="
Expected result:
"this is ss=aaa"
This change rewrites the macro to construct an unnamed temporary to
avoid any name collision.
Signed-off-by: Oguzhan Ozmen <[email protected]>
(cherry picked from commit c630f33)
Conflicts:
src/test/rgw/CMakeLists.txt
- A unittest listed in CMakeLists.txt is not available in tentacle.
Introduce two developer-level configuration options for controlled delay
injection during integration testing:
- rgw_inject_delay_sec: duration of the injected delay (in seconds)
- rgw_inject_delay_pattern: pattern to select which delay points are
activated
These options help reproduce timing-sensitive or race conditions in a
deterministic way during RGW integration tests.
In the future, these options may evolve to support more complex timing
scenarios by using list or map types. This would allow multiple delay
injection points to be configured simultaneously, for example: delaying
pattern A by 5 seconds, pattern B before or after a specific event, or
using different durations for each point.
Signed-off-by: Oguzhan Ozmen <[email protected]>
(cherry picked from commit 98276d9)
Signed-off-by: Oguzhan Ozmen <[email protected]> (cherry picked from commit b6ecd19)
Signed-off-by: Oguzhan Ozmen <[email protected]> (cherry picked from commit 8109a2e)
Signed-off-by: Oguzhan Ozmen <[email protected]> (cherry picked from commit 3a9bf2c)
…ts entries Add a new method `reset_entries()` to the `bucket_list_result` struct that clears the list of entries and resets the truncated flag. This would be used to enhance the re-use cases to avoid accessing stale entries or truncated flag. Signed-off-by: Oguzhan Ozmen <[email protected]> (cherry picked from commit ae59eac)
…to avoid stale listings RGWBucketFullSyncCR could spin indefinitely when the source bucket was already deleted. The coroutine reused a bucket_list_result member, and RGWListRemoteBucketCR populated it without clearing prior state. Stale entries/is_truncated from a previous iteration caused the loop to continue even after the bucket no longer existed. Fix by clearing the provided bucket_list_result at the start of RGWListRemoteBucketCR (constructor), ensuring each listing starts from a clean state and reflects the current remote bucket contents. This prevents the infinite loop and returns correct results when the bucket has been deleted. Fixes: https://tracker.ceph.com/issues/73799 Signed-off-by: Oguzhan Ozmen <[email protected]> (cherry picked from commit c8a66a9)
…e bucket is deleted in the middle Tests: https://tracker.ceph.com/issues/73799 Signed-off-by: Oguzhan Ozmen <[email protected]> (cherry picked from commit 9432f0e) Conflicts: src/test/rgw/rgw_multi/tests.py - Some testcases, available in main, aren't available in tentacle - add missing tests.py python module dependencies
Add ceph() and call_ceph() helper functions to test-rgw-common.sh that were missed during the backport of commit 415a16c. The test_multi.py ceph_admin() method calls test-rgw-call.sh with 'call_ceph' which requires these shell functions to exist. Signed-off-by: Oguzhan Ozmen <[email protected]>
Config Diff Tool Output+ added: rgw_inject_delay_pattern (rgw.yaml.in)
+ added: rgw_inject_delay_sec (rgw.yaml.in)
The above configuration changes are found in the PR. Please update the relevant release documentation if necessary. |
Contributor
Author
|
/config check ok |
batrick
approved these changes
May 9, 2026
BBoozmen
added a commit
to BBoozmen/ceph
that referenced
this pull request
May 12, 2026
Tests: https://tracker.ceph.com/issues/66100 Signed-off-by: Oguzhan Ozmen <[email protected]> (cherry picked from commit 5e6a9c8) Conflicts: src/test/rgw/rgw_multi/tests.py - the testcase test_object_lock_sync is not made available in tentacle - the testcase test_copy_obj_perm_check_between_zonegroups is added - an earlier tentacle backport (tentacle: RGW/multisite: fix bucket-full-sync infinite loop caused by stale bucket_list_result reuse ceph#67923) collides with this one as both PRs introduce a new testcase sharing some common functions and around the same location in tests.py.
BBoozmen
added a commit
to BBoozmen/ceph
that referenced
this pull request
Sep 1, 2026
Tests: https://tracker.ceph.com/issues/66100 Signed-off-by: Oguzhan Ozmen <[email protected]> (cherry picked from commit 5e6a9c8) Conflicts: src/test/rgw/rgw_multi/tests.py - the testcase test_object_lock_sync is not made available in tentacle - the testcase test_copy_obj_perm_check_between_zonegroups is added - an earlier tentacle backport (tentacle: RGW/multisite: fix bucket-full-sync infinite loop caused by stale bucket_list_result reuse ceph#67923) collides with this one as both PRs introduce a new testcase sharing some common functions and around the same location in tests.py. - a new backport to Tentacle add a new function which caused hunk hit merge conflict. Trivial merge-conflict in tests.py.
This was referenced Nov 3, 2026
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/75439
backport of #66203
parent tracker: https://tracker.ceph.com/issues/73799
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
/config check okcomment as the config items introduced are for development/testing purposes and not client-facing.