Bug #78364
closed"radosgw-admin bilog autotrim" bypasses the archive zone's bucket-instance removal protection
0%
Description
RGWArchiveBucketInstanceMetadataHandler::remove() is a deliberate no-op: bucket instance metadata is never supposed to be removable on an archive zone, since the archive tier's whole purpose is to retain history that other zones deleted:
int remove(std::string& entry, RGWObjVersionTracker& objv_tracker,
optional_yield y, const DoutPrefixProvider *dpp) override
{
ldpp_dout(dpp, 0) << "SKIP: bucket instance removal is not allowed on archive zone: bucket.instance:" << entry << dendl;
return 0;
}
The automatic background trim thread respects this indirectly, since it's gated off entirely on archive zones via sync_module_exports_data() == false.
However, radosgw-admin bilog autotrim has no equivalent gate — it calls create_admin_bucket_trim_cr unconditionally. As a result, Running the admin command manually on an archive zone can therefore delete a bucket instance the codebase explicitly says should never be removable there.
Fix: add the same sync_module_exports_data() check used by the automatic trim thread to the OPT::BILOG_AUTOTRIM handler in radosgw-admin.cc, so the CLI command refuses (or skips) on such zones.
OO Updated by Oguzhan Ozmen 5 months ago
- Status changed from In Progress to Fix Under Review
- Pull request ID set to 70299
UB Updated by Upkeep Bot 4 months ago
- Status changed from Fix Under Review to Pending Backport
- Merge Commit set to 014487f5848e4a86b50eb8b64908fcadcd24b12a
- Fixed In set to v21.3.0-1304-g014487f584
- Upkeep Timestamp set to 2026-07-22T15:49:35+00:00
UB Updated by Upkeep Bot 4 months ago
- Copied to Backport #78579: umbrella: "radosgw-admin bilog autotrim" bypasses the archive zone's bucket-instance removal protection added
UB Updated by Upkeep Bot 4 months ago
- Copied to Backport #78580: tentacle: "radosgw-admin bilog autotrim" bypasses the archive zone's bucket-instance removal protection added
UB Updated by Upkeep Bot 4 months ago
- Tags (freeform) set to backport_processed
UB Updated by Upkeep Bot 3 months ago
- Status changed from Pending Backport to Resolved
- Tags (freeform) deleted (
backport_processed) - Upkeep Timestamp changed from 2026-07-22T15:49:35+00:00 to 2026-08-27T18:42:30+00:00