Skip to content

umbrella: rgw/lc: don't report a canceled transition as transitioned - #73259

Merged
batrick merged 5 commits into
ceph:umbrellafrom
BBoozmen:wip-82301-umbrella
Nov 24, 2026
Merged

batrick merged 5 commits into
ceph:umbrellafrom
BBoozmen:wip-82301-umbrella

Conversation

@BBoozmen

Copy link
Copy Markdown
Contributor

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)
@BBoozmen BBoozmen added this to the umbrella milestone Oct 29, 2026
@BBoozmen BBoozmen added the rgw label Oct 29, 2026
@BBoozmen
BBoozmen requested a review from a team as a code owner October 29, 2026 20:55
@github-actions github-actions Bot added tests releng-audit-pass Release engineering: passed backport verification audit. labels Oct 29, 2026
@anrao19

anrao19 commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to wip-anrao14-testing-2026-11-04-1136-umbrella.

@batrick

batrick commented Nov 21, 2026

Copy link
Copy Markdown
Member

@batrick
batrick merged commit e872028 into ceph:umbrella Nov 24, 2026
23 checks passed
@anrao19

anrao19 commented Nov 26, 2026

Copy link
Copy Markdown
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
Pick up 10 PRs merged since the last changelog generation
(#73625 #73464 #72913 #72967 #72345 #74280 #73453 #73259 #73261 #72691).

Signed-off-by: Yuri Weinstein <[email protected]>
yuriw added a commit that referenced this pull request Nov 30, 2026
Pick up 10 PRs merged since the last changelog generation
(#73625 #73464 #72913 #72967 #72345 #74280 #73453 #73259 #73261 #72691).

Assisted-by: Claude-v2.1.332:claude-sonnet-5
Signed-off-by: Yuri Weinstein <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-qa releng-audit-pass Release engineering: passed backport verification audit. rgw tests wip-pdonnell-testing6

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants