Project

General

Profile

Actions

Bug #80915

closed
KB MH

rgw: radoslist names a nonexistent OLH for a versioned key starting with '_', and leaves out the real one

Bug #80915: rgw: radoslist names a nonexistent OLH for a versioned key starting with '_', and leaves out the real one

Added by Kyle Bader 2 months ago. Updated about 2 months ago.

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

0%

Source:
Backport:
umbrella, tentacle, squid
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Fixed In:
v21.3.0-4390-gd31d96802d
Released In:
Upkeep Timestamp:
2026-10-14T02:55:16+00:00

Description

Found by comparing an independent listing (a bucket's index shards and head manifests, read directly) with radosgw-admin bucket radoslist, object for object. Reproduced on a single-host vstart cluster built from main at 7ed73efc1be; the code cited is unchanged at 2d0cd8af0a0, and the same in reef, squid and tentacle. M stands for the bucket's marker.

For each versioned key, RGWRadosList::process_bucket also stats the key's OLH, the head without an instance (orphan.cc:1304):

rgw_obj_key uninstanced(entry.key.name);

entry.key.name is the bucket index key, in which a name starting with _ is escaped with another _. The std::string constructor does not parse it back, so get_oid() escapes it a second time. For the key _v, radoslist stats M____v, which does not exist, instead of the OLH M___v (locator M__v). The ENOENT path (orphan.cc:1069-1076) then prints the nonexistent name, and the real OLH is never listed:

$ radosgw-admin bucket radoslist --bucket=b
M__:LiJ2rbKQL9rTNOMIojn06QshHnFjiro__v
M____v
ERROR: pop_and_handle_stat_op: stat of head object resulted in ENOENT; oid=M____v
$ rados -p default.rgw.buckets.data --object-locator M__v stat M___v
default.rgw.buckets.data/M___v mtime ..., size 0

With --rgw-obj-fs the line's key is __v, the escaped index key, which is not an S3 key. rgw-gap-list reports it as a gap: Bucket: "b" Object: "__v". rgw-orphan-list is not affected, because it sets aside every object with a locator. A tool that compares located objects with radoslist would report the OLH as an orphan.

Reproducer: in a bucket with versioning enabled, put the key _v, then run radosgw-admin bucket radoslist --bucket=<bucket>.

Fix: parse the index key, as the rgw_obj_index_key constructor does, e.g. rgw_obj_key uninstanced(rgw_obj_index_key(entry.key.name));.


Related issues 3 (1 open — 2 closed)

Copied to rgw - Backport #81737: tentacle: rgw: radoslist names a nonexistent OLH for a versioned key starting with '_', and leaves out the real oneFix Under ReviewMatthew Heler

Actions
Copied to rgw - Backport #81738: squid: rgw: radoslist names a nonexistent OLH for a versioned key starting with '_', and leaves out the real oneResolvedMatthew Heler

Actions
Copied to rgw - Backport #81739: umbrella: rgw: radoslist names a nonexistent OLH for a versioned key starting with '_', and leaves out the real oneResolvedMatthew Heler

Actions

MH Updated by Matthew Heler 2 months ago Actions #1

  • Assignee set to Matthew Heler
  • Backport changed from tentacle to umbrella, tentacle, squid
  • Pull request ID set to 72122

MH Updated by Matthew Heler 2 months ago Actions #2

  • Status changed from New to Fix Under Review

UB Updated by Upkeep Bot about 2 months ago Actions #3

  • Copied to Backport #81737: tentacle: rgw: radoslist names a nonexistent OLH for a versioned key starting with '_', and leaves out the real one added

UB Updated by Upkeep Bot about 2 months ago Actions #4

  • Copied to Backport #81738: squid: rgw: radoslist names a nonexistent OLH for a versioned key starting with '_', and leaves out the real one added

UB Updated by Upkeep Bot about 2 months ago Actions #5

  • Copied to Backport #81739: umbrella: rgw: radoslist names a nonexistent OLH for a versioned key starting with '_', and leaves out the real one added

UB Updated by Upkeep Bot about 2 months ago Actions #6

  • Status changed from Fix Under Review to Backporting
  • Merge Commit set to d31d96802d50dbdb327643e1572d3fd378ad488e
  • Fixed In set to v21.3.0-4390-gd31d96802d
  • Upkeep Timestamp set to 2026-10-14T02:55:16+00:00
Actions

Also available in: PDF Atom