Bug 1757298 - [RGW]: Bucket rename creates a duplicate entry in bucket list
Summary: [RGW]: Bucket rename creates a duplicate entry in bucket list
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: RGW
Version: 3.3
Hardware: x86_64
OS: Linux
high
high
Target Milestone: z2
: 3.3
Assignee: shilpa
QA Contact: Tejas
URL:
Whiteboard:
Depends On:
Blocks: 1793400
TreeView+ depends on / blocked
 
Reported: 2019-10-01 06:44 UTC by Tejas
Modified: 2020-01-29 23:04 UTC (History)
11 users (show)

Fixed In Version: RHEL: ceph-12.2.12-80.el7cp Ubuntu: ceph_12.2.12-73redhat1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1793400 (view as bug list)
Environment:
Last Closed: 2019-12-19 17:58:49 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:4353 0 None None None 2019-12-19 17:59:12 UTC

Description Tejas 2019-10-01 06:44:34 UTC
Description of problem:
   Bucket link command used to rename a tenanted bucket created a duplicate entry in the bucket list

Version-Release number of selected component (if applicable):
ceph version 12.2.12-71.el7cp

How reproducible:
Always

Steps to Reproduce:
Mentioned below

Expected results:
Duplicate entry should not be seen

Additional info:

root@magna111 ubuntu]# radosgw-admin bucket list --uid tmp --tenant tenant
[
    "buck1"
]
[root@magna111 ubuntu]# radosgw-admin bucket list --uid 'tenant$tmp'
[
    "buck1"
]
[root@magna111 ubuntu]# 
[root@magna111 ubuntu]# radosgw-admin bucket link --bucket buck1 --bucket-new-name buck2 --uid tmp --tenant tenant
[root@magna111 ubuntu]# 
[root@magna111 ubuntu]# radosgw-admin bucket list --uid tmp --tenant tenant
[
    "buck2"          <============ only 1 entry seen
]
[root@magna111 ubuntu]# radosgw-admin bucket list --uid 'tenant$tmp'
[
    "buck2"


root@magna111 ubuntu]# radosgw-admin bucket list | grep buck1
    "tenant/buck1",   <===================== old entry still present
    "ten1/buck1",
[root@magna111 ubuntu]# radosgw-admin bucket list | grep buck2
    "tenant/buck2",
    "ten1/buck2"


root@magna111 ubuntu]# radosgw-admin bucket stats --bucket tenant/buck2
{
    "bucket": "buck2",
    "zonegroup": "11bb307c-428a-4a73-b353-414a9a53115f",
    "placement_rule": "default-placement",
    "explicit_placement": {
        "data_pool": "",
        "data_extra_pool": "",
        "index_pool": ""
    },
    "id": "97a40883-088d-4bae-88d8-671075e6d94f.406050.1",
    "marker": "97a40883-088d-4bae-88d8-671075e6d94f.406050.1",
    "index_type": "Normal",
    "owner": "tenant$tmp",    <==========================  correct owner after rename
    "ver": "0#1",
    "master_ver": "0#0",
    "mtime": "2019-10-01 06:31:31.011499",
    "max_marker": "0#",
    "usage": {},
    "bucket_quota": {
        "enabled": false,
        "check_on_raw": false,
        "max_size": -1,
        "max_size_kb": 0,
        "max_objects": -1
    }
}
[root@magna111 ubuntu]# radosgw-admin bucket stats --bucket tenant/buck1
{
    "bucket": "buck1",
    "zonegroup": "11bb307c-428a-4a73-b353-414a9a53115f",
    "placement_rule": "default-placement",
    "explicit_placement": {
        "data_pool": "",
        "data_extra_pool": "",
        "index_pool": ""
    },
    "id": "97a40883-088d-4bae-88d8-671075e6d94f.406050.1",
    "marker": "97a40883-088d-4bae-88d8-671075e6d94f.406050.1",
    "index_type": "Normal",
    "owner": "tenant$tmp",   <=============================  old  entry
    "ver": "0#1",
    "master_ver": "0#0",
    "mtime": "2019-10-01 06:29:29.426309",
    "max_marker": "0#",
    "usage": {},
    "bucket_quota": {
        "enabled": false,
        "check_on_raw": false,
        "max_size": -1,
        "max_size_kb": 0,
        "max_objects": -1
    }


root@magna111 ubuntu]# s3cmd ls -c .s3tmp 
2019-10-01 06:31  s3://buck2

Comment 11 errata-xmlrpc 2019-12-19 17:58:49 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:4353


Note You need to log in before you can comment on or make changes to this bug.