Repository navigation
umbrella: rgw/lc: don't report a canceled transition as transitioned - #73259
Merged
Merged
Conversation
Add a "delay_copy_obj_data_complete" point for rgw_inject_delay_pattern that holds copy_obj_data() after it reads the source and before it writes the head object. Tests use it to land a concurrent overwrite in that window, e.g. while lifecycle is transitioning an object. Signed-off-by: Oguzhan Ozmen <[email protected]> (cherry picked from commit 417ab00)
Overwrite an object while lifecycle is transitioning it, between reading the source and writing the head. The transition loses the race and is rolled back, so lifecycle must not log it as TRANSITIONED. The lifecycle suite runs rgw with 'rgw lc debug interval: 10', so its own LC thread could transition the object (or the overwritten one) before radosgw-admin does. Use a 5-day rule and run radosgw-admin with a 1s day: the object is due for radosgw-admin after 5s but for rgw only after 50s. Rerun radosgw-admin if it exits before the transition starts, e.g. when rgw's LC thread holds the shard lock. Without the fix, lifecycle logs the canceled transition as "TRANSITIONED" and the test fails. Reproduces: https://tracker.ceph.com/issues/81669 Signed-off-by: Oguzhan Ozmen <[email protected]> (cherry picked from commit aefeeec)
If a transition loses a race (the object is overwritten or removed while it is being copied), the write is rolled back and it's set "canceled" with 0 return value. copy_obj_data() passed no pcanceled pointer, so the flag was dropped and transition_obj() reported success for an object it had not moved. Lifecycle then logged it as "TRANSITIONED", bumped the transition counters and published a notification for it. Add the "pcanceled" param instead of passing nullptr and return -ECANCELED when the write was canceled, so lifecycle handles it like any other failed transition. The object is re-evaluated against the rules on the next lifecycle run. Fixes: https://tracker.ceph.com/issues/81669 Signed-off-by: Oguzhan Ozmen <[email protected]> (cherry picked from commit acb0dcc)
transition() returns -ECANCELED when the object was overwritten or removed while lifecycle was transitioning it. Say so in the error message, so this race can be told apart from other transition failures. Check for it in the canceled-transition test. Signed-off-by: Oguzhan Ozmen <[email protected]> (cherry picked from commit 5058dbe)
LCOpRule::execute() runs every lifecycle action (expiration and transition), but logged any failure as "ERROR: remove_expired_obj", so a failed transition read like a failed expiration. Use generic "lifecycle action failed" message instead. Also add the rule ID so the failure can be traced back to the rule that fired. Signed-off-by: Oguzhan Ozmen <[email protected]> (cherry picked from commit de60bc8)
adamemerson
approved these changes
Nov 2, 2026
Contributor
|
This PR has been added to wip-anrao14-testing-2026-11-04-1136-umbrella. |
Member
|
This PR has been added to umbrella integration testing by pdonnell started 2026-11-21-05:14. |
Contributor
|
This PR has been removed from wip-anrao14-testing-2026-11-13-0754-umbrella. |
yuriw
added a commit
that referenced
this pull request
Nov 30, 2026
yuriw
added a commit
that referenced
this pull request
Nov 30, 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/82301
backport of #72609
parent tracker: https://tracker.ceph.com/issues/81669
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