Repository navigation
tentacle: rgw: fix bilog autotrim of stale bucket.instance metadata after peer deletion - #70456
Conversation
…ary reshard Adds test_bucket_log_trim_enoent_race_after_reshard to reproduce the exact failure from tracker ceph#70858: when autotrim runs on the primary zone first and fully cleans up (including removing its own bucket.instance metadata), then an autotrim on the secondary zone asks the primary and receives -ENOENT. The secondary hasn't received the BucketLogType::Deleted flag yet (metadata sync is stalled via delay injection), so the current code left StatusShards{generation=0, shards=[]} which caused take_min_status() to fail with -EINVAL, leaving the bucket.instance metadata permanently orphaned. Tests: https://tracker.ceph.com/issues/70858 Signed-off-by: Oguzhan Ozmen <[email protected]> (cherry picked from commit 43518e2)
An all-peer -ENOENT does not by itself mean a bucket is deleted: a live bucket whose sync status is not yet initialized returns -ENOENT too. Add two testcases that verifies we do not accidentally delete instance of a live bucket: - test_bucket_log_trim_live_empty_bucket_not_removed: a data-less bucket never gets sync status, so every peer reports -ENOENT; autotrim must not remove its instance. - test_bucket_log_trim_new_bucket_entrypoint_not_synced: a new bucket whose instance has synced to the secondary before its entrypoint must survive autotrim. A delay_meta_sync_bucket_entrypoint_store injection forces that window. Tests: https://tracker.ceph.com/issues/70858 Signed-off-by: Oguzhan Ozmen <[email protected]> (cherry picked from commit 6cc8ee2)
When a peer returns -ENOENT for a bucket's sync status, the old code only purged the log if the local layout already carried BucketLogType::Deleted. That flag may never arrive once the deleting zone removes its own instance (ceph#70858), so trim aborted with -EINVAL and left bucket.instance metadata orphaned. But an all-peer -ENOENT is also ambiguous: a live bucket whose sync status is not yet initialized looks the same. The Deleted flag is unreliable here, and the local entrypoint is not authoritative during creation (the instance syncs to peers before the entrypoint). So on all-peer -ENOENT, confirm the bucket is really gone by reading its entrypoint from the metadata master, which is authoritative and available immediately on creation; if this zone is the metadata master its local read already suffices. Only on confirmed deletion remove the orphaned instance directly; on any failure, skip and retry on the next trim cycle. Fixes: https://tracker.ceph.com/issues/70858 Signed-off-by: Oguzhan Ozmen <[email protected]> (cherry picked from commit 35135ce)
…s shards CR The peer -ENOENT handling in RGWReadRemoteStatusShardsCR no longer consults the local bucket layout (whether Deleted flag set or not), so its bucket_info member and the matching constructor arg are not used anymore. Signed-off-by: Oguzhan Ozmen <[email protected]> (cherry picked from commit 90f7bff)
Raise a few low-frequency, high-signal bilog trim events so they are visible at the default log level: Trim pace is bounded by the rgw trim config options and these events fire at most once per bucket or once per trim cycle, so they are not expected to be chatty. Signed-off-by: Oguzhan Ozmen <[email protected]> (cherry picked from commit 80f203e)
|
This PR has been added to tentacle integration testing by anuchaithra started 2026-07-29-08:36. |
|
Removing from the current run due to a failure in |
|
This PR has been removed from wip-anuchaithra-testing-20260729.084156-tentacle. |
|
This PR has been added to tentacle integration testing by anuchaithra started 2026-08-05-06:31. |
Signed-off-by: Oguzhan Ozmen <[email protected]> (cherry picked from commit d0c466c)
test_bucket_log_trim_after_delete_bucket_secondary_reshard is meant to reshard the bucket on the *secondary* zone, then delete it on the primary and verify bilog autotrim cleans up the stale bucket.instance metadata. But the reshard command was issued without zone arguments, so radosgw-admin fell back to the default zone of the client it ran on (the primary). The bucket was therefore resharded on the primary, not the secondary, so the test never exercised the cross-zone generation mismatch that the trim fix handles. Append secondary.zone.zone_args() so the reshard explicitly targets the secondary zone. This is the single relevant hunk of upstream commit 3ae0007 (PR ceph#67661, tracker https://tracker.ceph.com/issues/75340). The remainder of that commit adjusts test_versioned_bucket_sync_disable_enable_object_delete, which does not exist on this branch, so only this hunk is taken. Signed-off-by: Oguzhan Ozmen <[email protected]>
@adamemerson thanks for pulling this from the run. Both failures are test-harness gaps on tentacle, not issues with the backported fix. I've addressed both with test-only ( 1)
2) I also noticed a relevant testcase failure (one of the 2 suites): The backported fix here is unchanged and correct; this is a second missing test-only change. On tentacle the test's Net: two small test-only commits added on top of this PR; the backported fix itself is untouched.
Unfortunately, you'll need to re-create a new ceph-ci test branch. You'll need to spin a fresh ceph-ci test branch/build to pick up the two commits I just pushed to this backport PR:
|
|
/audit override |
|
✅ Audit Override Applied by @adamemerson. |
There was a problem hiding this comment.
Ceph Release Engineering Audit Report
Automated Redmine Linkage Audit
The following tracking irregularities were found:
- Rejected Backport Ticket: Backport tracker #75638 is marked as Rejected. Perhaps this backport PR should be closed?
- Missing PR Link: Backport tracker #75638 has no 'Pull Request ID' field set. Please link it to PR #70456.
Automated Backport Parity Review - Invalid Commit Format
The following commits have an invalid format. Backport commits must either include a standard (cherry picked from commit ...) line or start with the target branch name (e.g., tentacle:).
84182b6drgw/test/multisite: reshard the secondary zone in bilog-trim delete test
Be familiar with the rules and guidelines for writing backports.
Automated Backport Parity Review
Discrepancies detected between the backport PR and the original source PR(s). Please see the Commit Parity Visualizer below.
Commit Parity Visualizer
| BACKPORT PR #70456 | SOURCE PR |
SOURCE STATUS |
|---|---|---|
| c252c29 rgw/test/multisite: add a mechanism to use custom config temporarily | PR #67798 | d0c466c rgw/test/multisite: add a mechanism to use custom config temporarily |
| <<<< MISSING IN BACKPORT >>>> | d8a6489 rgw/test/multisite: use config's retry settings | |
| <<<< MISSING IN BACKPORT >>>> | 95465d6 rgw/test/multisite: test_period_update_commit use a custom retry setting | |
| <<<< MISSING IN BACKPORT >>>> | 2a83b3e rgw/test/multisite: run sync status on the intended zone | |
| <<<< MISSING IN BACKPORT >>>> | ba2dc12 rgw/test/multisite: get_oldest_incremental_change_not_applied_epoch - handle sync-status failure gracefully | |
| <<<< MISSING IN BACKPORT >>>> | 60666a2 rgw/test/multisite: revise test_period_update_commit testcase client wkld settings | |
| <<<< MISSING IN BACKPORT >>>> | 735490b rgw/test/multisite: revise test_period_update_commit zone selection for clarity | |
| <<<< MISSING IN BACKPORT >>>> | a42cf8e rgw/pubsub: fix uninitialized num_shards causing topic deletion hang | |
| 0fc59fb rgw/test/multisite: test for bilog autotrim -ENOENT race after secondary reshard | PR #70003 | 43518e2 rgw/test/multisite: test for bilog autotrim -ENOENT race after secondary reshard |
| c72593b rgw/test/multisite: tests for bilog autotrim -ENOENT interpretation | 6cc8ee2 rgw/test/multisite: tests for bilog autotrim -ENOENT interpretation | |
| 3c6d0d5 rgw/bilog/trim: fix stale bucket.instance metadata after peer deletion | 35135ce rgw/bilog/trim: fix stale bucket.instance metadata after peer deletion | |
| 5dd425b rgw/bilog/trim: (non-functional) remove unused bucket_info from status shards CR | 90f7bff rgw/bilog/trim: (non-functional) remove unused bucket_info from status shards CR | |
| 21af17c rgw/bilog/trim: (non-functional) set some bilog trim events to level 1 | 80f203e rgw/bilog/trim: (non-functional) set some bilog trim events to level 1 | |
| 84182b6 rgw/test/multisite: reshard the secondary zone in bilog-trim delete test | <<<< EXTRA IN BACKPORT >>>> |
🛟 Need Help?
If you need technical help resolving these issues, please consult with the Component Lead. If you need administrative overrides, please see the #ceph-upstream-releases channel on Slack and request a review from the @ceph/ceph-release-manager.
📋 Component Lead / Release Manager
To override the audit failure, apply releng-audit-override label or comment /audit override.
When you are ready for a new audit, please remove the releng-audit-fail label or comment /audit retest.
|
/audit override |
|
✅ Audit Override Applied by @adamemerson. |
pr testing completed with new build and approved by @ivancich , more details : https://tracker.ceph.com/issues/79051 |
Thank you @anrao19 . Unfortunately, you'll need to run the multisite test again after creating an new ceph-ci test-branch. The current test-branch wip-anuchaithra-testing-20260805.063130-tentacle doesn't include the 2 commits I added on Aug 08 (please see above comment for details). Since it doesn't include these 2 new commits, we still get the below error in this run: @anrao19 - If you don't mind, can you please create a new test-branch to get the latest state of this PR. I'll mark this "needs-qa" again as a result. Perhaps, you can include this PR in another QA Run tracker to unblock other PRs also included in https://tracker.ceph.com/issues/79051 or re-do the this tracker again. |
|
This PR has been added to wip-yuri14-testing-20260812.153525-tentacle. |
@yuriw just looked at your rgw run for this branch: https://pulpito.ceph.com/yuriw-2026-08-12_19:24:08-rgw-wip-yuri14-testing-20260812.153525-tentacle-distro-default-trial/: the results look good. In both multisite sites (2-zone and 2-zonegroup), all the related 6 testcases passed: A couple of testcases failed are not relevant to this PR; we can mark this one TESTED. |
|
@BBoozmen Can you please do Patrick's stuff? |
|
@adamemerson / @batrick - looking at the requested changes comment above, it refers to https://tracker.ceph.com/issues/75638 but it's a totally different tracker. This PR's
I think there might be a mixup?
An earlier comment above explains why we needed to cherry-pick two commits from two different PRs that weren't backported to Tentacle. BTW, as noted in the other comment above, I verified that the related testcases passed in @yuriw 's QA test so I'll mark this TESTED. |
Thanks for explaining. This looks good to me. |

backport tracker: https://tracker.ceph.com/issues/78582
backport of #70003
parent tracker: https://tracker.ceph.com/issues/70858
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