On Tue, Mar 06, 2018 at 02:40:11PM -0500, Ryan Leimenstoll wrote: > Hi all, > > We are trying to move a bucket in radosgw from one user to another in an > effort both change ownership and attribute the storage usage of the data to > the receiving user’s quota. > > I have unlinked the bucket and linked it to the new user using: > > radosgw-admin bucket unlink —bucket=$MYBUCKET —uid=$USER > radosgw-admin bucket link —bucket=$MYBUCKET —bucket-id=$BUCKET_ID > —uid=$NEWUSER > > However, perhaps as expected, the owner of all the objects in the > bucket remain as $USER. I don’t believe changing the owner is a > supported operation from the S3 protocol, however it would be very > helpful to have the ability to do this on the radosgw backend. This is > especially useful for large buckets/datasets where copying the objects > out and into radosgw could be time consuming. At the raw radosgw-admin level, you should be able to do it with bi-list/bi-get/bi-put. The downside here is that I don't think the BI ops are exposed in the HTTP Admin API, so it's going to be really expensive to chown lots of objects.
Using a quick example:
# radosgw-admin \
--uid UID-CENSORED \
--bucket BUCKET-CENSORED \
bi get \
--object=OBJECTNAME-CENSORED
{
"type": "plain",
"idx": "OBJECTNAME-CENSORED",
"entry": {
"name": "OBJECTNAME-CENSORED",
"instance": "",
"ver": {
"pool": 5,
"epoch": 266028
},
"locator": "",
"exists": "true",
"meta": {
"category": 1,
"size": 1066,
"mtime": "2016-11-17 17:01:29.668746Z",
"etag": "e7a75c39df3d123c716d5351059ad2d9",
"owner": "UID-CENSORED",
"owner_display_name": "UID-CENSORED",
"content_type": "image/png",
"accounted_size": 1066,
"user_data": ""
},
"tag": "default.293024600.1188196",
"flags": 0,
"pending_map": [],
"versioned_epoch": 0
}
}
--
Robin Hugh Johnson
Gentoo Linux: Dev, Infra Lead, Foundation Treasurer
E-Mail : [email protected]
GnuPG FP : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85
GnuPG FP : 7D0B3CEB E9B85B1F 825BCECF EE05E6F6 A48F6136
signature.asc
Description: Digital signature
_______________________________________________ ceph-users mailing list [email protected] http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
