Actions
Bug #57936
open'radosgw-admin bucket chown' doesn't set bucket instance owner or unlink from old owner
% Done:
0%
Source:
Tags:
chown backport_processed
Backport:
quincy
Regression:
No
Severity:
3 - minor
Reviewed:
Description
steps to reproduce:
1. start a vstart cluster and create a bucket as user 'testid'
~/ceph/build $ MON=1 OSD=1 RGW=1 MGR=0 MDS=0 ../src/vstart.sh -n -d ~/ceph/build $ bin/radosgw-admin user list [ "56789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234", "testx$9876543210abcdef0123456789abcdef0123456789abcdef0123456789abcdef", "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef", "test", "testid" ] ~/ceph/build $ s3cmd mb s3://testbucket Bucket 's3://testbucket/' created ~/ceph/build $ bin/radosgw-admin metadata list bucket.instance [ "testbucket:5c06055b-ce0d-4829-8d66-4fec8a3b69cf.4147.1" ] ~/ceph/build $ bin/radosgw-admin metadata get bucket.instance:testbucket:5c06055b-ce0d-4829-8d66-4fec8a3b69cf.4147.1 | grep owner "owner": "testid", ~/ceph/build $ bin/radosgw-admin metadata get bucket:testbucket | grep owner "owner": "testid",
2. change bucket owner to user 'test'. the bucket instance's owner is still 'testid', and the bucket is now linked to both users
~/ceph/build $ bin/radosgw-admin bucket chown --bucket testbucket --uid test 0 objects processed in :testbucket[5c06055b-ce0d-4829-8d66-4fec8a3b69cf.4147.1]). Next marker ~/ceph/build $ bin/radosgw-admin metadata get bucket.instance:testbucket:5c06055b-ce0d-4829-8d66-4fec8a3b69cf.4147.1 | grep owner "owner": "testid", ~/ceph/build $ bin/radosgw-admin metadata get bucket:testbucket | grep owner "owner": "test", ~/ceph/build $ bin/radosgw-admin bucket list --uid testid [ "testbucket" ] ~/ceph/build $ bin/radosgw-admin bucket list --uid test [ "testbucket" ]
3. upload a single 128MB object to the bucket. the new object is counted against the 'user stats' of both users
~/ceph/build $ s3cmd put 128m.iso s3://testbucket ... upload: '128m.iso' -> 's3://testbucket/128m.iso' [part 9 of 9, 8MB] [1 of 1] 8388608 of 8388608 100% in 0s 127.21 MB/s done ~/ceph/build $ bin/radosgw-admin user stats --uid testid --sync-stats { "stats": { "size": 134217728, "size_actual": 134217728, "size_kb": 131072, "size_kb_actual": 131072, "num_objects": 1 }, "last_stats_sync": "2022-10-26T21:37:56.577699Z", "last_stats_update": "2022-10-26T21:37:56.576376Z" } ~/ceph/build $ bin/radosgw-admin user stats --uid test --sync-stats { "stats": { "size": 134217728, "size_actual": 134217728, "size_kb": 131072, "size_kb_actual": 131072, "num_objects": 1 }, "last_stats_sync": "2022-10-26T21:38:00.272976Z", "last_stats_update": "2022-10-26T21:38:00.271206Z" }
this behavior was last changed in https://github.com/ceph/ceph/pull/41108
Updated by Casey Bodley over 1 year ago
- Status changed from New to In Progress
- Assignee set to Daniel Gryniewicz
Updated by Daniel Gryniewicz over 1 year ago
- Status changed from In Progress to Fix Under Review
- Pull request ID set to 48730
Updated by Casey Bodley about 1 year ago
- Status changed from Fix Under Review to Resolved
Updated by Casey Bodley about 1 year ago
- Status changed from Resolved to Pending Backport
Updated by Backport Bot about 1 year ago
- Copied to Backport #58509: quincy: 'radosgw-admin bucket chown' doesn't set bucket instance owner or unlink from old owner added
Updated by Backport Bot about 1 year ago
- Tags changed from chown to chown backport_processed
Actions