Project

General

Profile

Actions

Bug #77278

closed
RG MH

rgw/duplicate entries in radosgw-admin lc list

Bug #77278: rgw/duplicate entries in radosgw-admin lc list

Added by Reid Guyett 6 months ago. Updated 3 months ago.

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

0%

Source:
Community (user)
Backport:
squid, tentacle, umbrella
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Fixed In:
v21.3.0-490-gc0f5b1c9ff
Released In:
Upkeep Timestamp:
2026-08-27T18:36:06+00:00

Description

I was investigating why a LC didn't process over the weekend. When I checked radosgw-admin lc list, I noticed that there were multiple entries for the bucket.

# radosgw-admin lc list | grep -A3 bucket-name
        "bucket": ":bucket-name:0a6e5079-ad65-4ea7-a868-b2133099e0d0.1784023559.13521",
        "shard": "lc.4",
        "started": "Thu, 01 Jan 1970 00:00:00 GMT",
        "status": "UNINITIAL" 
--
        "bucket": ":bucket-name:0a6e5079-ad65-4ea7-a868-b2133099e0d0.1784023559.13521",
        "shard": "lc.20",
        "started": "Tue, 02 Jun 2026 00:07:19 GMT",
        "status": "COMPLETE" 

The bucket currently has around 72M objects, 1999 shards through dynamic resharding, versioning is enabled, and object lock is enabled.

I tried to delete the lifecycle policy using aws client. It left one but I can't remove it.

# radosgw-admin lc list | grep -A3 bucket-name
        "bucket": ":bucket-name:0a6e5079-ad65-4ea7-a868-b2133099e0d0.1784023559.13521",
        "shard": "lc.20",
        "started": "Tue, 02 Jun 2026 00:07:19 GMT",
        "status": "COMPLETE" 

Trying to process it gives an error.

# radosgw-admin lc process --bucket bucket-name
2026-06-09T19:35:29.216+0000 7f30be609b40  0 lifecycle: WARNING: bucket_attrs.find(RGW_ATTR_LC) failed for bucket-name (terminates bucket_lc_process(...))

Related issues 3 (0 open — 3 closed)

Copied to rgw - Backport #77747: umbrella: rgw/duplicate entries in radosgw-admin lc listResolvedMatthew Heler

Actions
Copied to rgw - Backport #77748: tentacle: rgw/duplicate entries in radosgw-admin lc listResolvedMatthew Heler

Actions
Copied to rgw - Backport #77749: squid: rgw/duplicate entries in radosgw-admin lc listResolvedMatthew Heler

Actions

JI Updated by J. Eric Ivancich 6 months ago Actions #1

We discussed this in the rgw bug scrub today. The theory is that the number of LC shards was changed after the system was running. This alters the mapping of bucket to shard, and one entry for this bucket is using the old mapping. This change is not recommended and perhaps the documentation isn't clear on this matter.

Casey noticed that radosgw-admin has a "lc reshard fix" sub-command. We're not sure what that does; have you looked into it?

@Matt Benjamin : do you have any thoughts?

RG Updated by Reid Guyett 6 months ago Actions #2

I looked at ceph config log and that value was changed recently. I think I grabbed the wrong setting when trying to change the number of LC workers. Since most of the LC entries were created with the default, I will revert it back.

radosgw-admin lc reshard fix seems to add missing entries to the correct shards but doesn't appear to remove the invalid shards.

I noticed that these are omap on the shards, could the invalid omap be removed from the shards with the rados rmomapkey command? I'm not sure if there is other information or just this omap.

MH Updated by Matthew Heler 6 months ago Actions #3

The docs need an update here, to make it clear changing this option should be done diligently with thoughtful care.

I also think an operator driven tool is needed as well to move LCEntry into the appropriate hashed shards if this value is changed. There may be legitimate reasons why an operator may want to increase the number of shards.

MH Updated by Matthew Heler 6 months ago Actions #4

  • Assignee set to Matthew Heler

RG Updated by Reid Guyett 6 months ago Actions #5

I was able to fix my situation.
1. Reverted setting

ceph config set client.rgw rgw_lc_max_objs 32

2. Backed up LC policies of items with duplicate entries.
for BUCKET in $LISTOFBUCKETS; do aws --profile s3-admin s3api get-bucket-lifecycle --bucket "$BUCKET" > "$BUCKET-lc.json" ; done

3. Delete LC policies.
for BUCKET in $LISTOFBUCKETS; do aws --profile s3-admin s3api delete-bucket-lifecycle --bucket "$BUCKET" ; done

4. Deleted the omap keys from lc shards.
rados -p zone.rgw.log -N lc rmomapkey lc.N $BUCKET.$marker

5. Restore LC policies.
for BUCKET in $LISTOFBUCKETS; do aws --profile s3-admin s3api put-bucket-lifecycle --bucket "$BUCKET" --lifecycle-configuration file://$BUCKET-lc.json ; done

MH Updated by Matthew Heler 6 months ago Actions #6

  • Backport changed from tentacle to tentacle, umbrella
  • Pull request ID set to 69528

CB Updated by Casey Bodley 6 months ago Actions #7

  • Status changed from New to Fix Under Review

MH Updated by Matthew Heler 5 months ago Actions #8

  • Backport changed from tentacle, umbrella to squid, tentacle, umbrella

UB Updated by Upkeep Bot 5 months ago Actions #9

  • Status changed from Fix Under Review to Pending Backport
  • Merge Commit set to c0f5b1c9ff74301eae40e247d576baa241fa0a2c
  • Fixed In set to v21.3.0-490-gc0f5b1c9ff
  • Upkeep Timestamp set to 2026-06-27T05:52:14+00:00

UB Updated by Upkeep Bot 5 months ago Actions #10

  • Copied to Backport #77747: umbrella: rgw/duplicate entries in radosgw-admin lc list added

UB Updated by Upkeep Bot 5 months ago Actions #11

  • Copied to Backport #77748: tentacle: rgw/duplicate entries in radosgw-admin lc list added

UB Updated by Upkeep Bot 5 months ago Actions #12

  • Copied to Backport #77749: squid: rgw/duplicate entries in radosgw-admin lc list added

UB Updated by Upkeep Bot 5 months ago Actions #13

  • Tags (freeform) set to backport_processed

UB Updated by Upkeep Bot 3 months ago Actions #14

  • Status changed from Pending Backport to Resolved
  • Tags (freeform) deleted (backport_processed)
  • Upkeep Timestamp changed from 2026-06-27T05:52:14+00:00 to 2026-08-27T18:36:06+00:00
Actions

Also available in: PDF Atom