Project

General

Profile

Actions

Bug #78364

closed
OO OO

"radosgw-admin bilog autotrim" bypasses the archive zone's bucket-instance removal protection

Bug #78364: "radosgw-admin bilog autotrim" bypasses the archive zone's bucket-instance removal protection

Added by Oguzhan Ozmen 5 months ago. Updated 3 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
tentacle umbrella
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Fixed In:
v21.3.0-1304-g014487f584
Released In:
Upkeep Timestamp:
2026-08-27T18:42:30+00:00
Tags:

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.


Related issues 2 (0 open — 2 closed)

Copied to rgw - Backport #78579: umbrella: "radosgw-admin bilog autotrim" bypasses the archive zone's bucket-instance removal protectionResolvedOguzhan Ozmen

Actions
Copied to rgw - Backport #78580: tentacle: "radosgw-admin bilog autotrim" bypasses the archive zone's bucket-instance removal protectionResolvedOguzhan Ozmen

Actions

OO Updated by Oguzhan Ozmen 5 months ago Actions #1

  • Status changed from In Progress to Fix Under Review
  • Pull request ID set to 70299

UB Updated by Upkeep Bot 4 months ago Actions #2

  • 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 Actions #3

  • 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 Actions #4

  • 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 Actions #5

  • Tags (freeform) set to backport_processed

UB Updated by Upkeep Bot 3 months ago Actions #6

  • 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
Actions

Also available in: PDF Atom