Bug #12955
closedSetting ACL on Object removes ETag
0%
Description
When a set object acl call is made against an object, we have found that the etag and content-type gets cleared from the object record in radosgw.
The etag is still available on a head request to the object, but will show as empty when doing a bucket listing, via s3 or radosgw-admin.
radosgw-admin buckets list --bucket=acl-test
[
{
"name": "1m",
"instance": "",
"namespace": "",
"owner": "7e1af43925cbef79334d2da290d602d586d04d7dd9aeb970c95ab93c0641c1f4",
"owner_display_name": "t3os_test",
"size": 1048576,
"mtime": "2015-09-04 17:35:15.000000Z",
"etag": "b6d81b360a5672d80c27430f39153e2c",
"content_type": "application\/octet-stream",
"tag": "default.165768.937",
"flags": 0
}
]
radosgw-admin buckets list --bucket=acl-test
[
{
"name": "1m",
"instance": "",
"namespace": "",
"owner": "7e1af43925cbef79334d2da290d602d586d04d7dd9aeb970c95ab93c0641c1f4",
"owner_display_name": "t3os_test",
"size": 1048576,
"mtime": "2015-09-04 17:35:29.000000Z",
"etag": "",
"content_type": "",
"tag": "_R6i1XhhxtUKy5_Z0o2UUvSkYt6Dq94n",
"flags": 0
}
]
Updated by Yehuda Sadeh over 8 years ago
This looks like a duplicate of something that we fixed recently.
Updated by Mike Beyer over 8 years ago
We're running on the latest stable of Hammer and we're seeing the code that we think causes this problem still on master. We are currently testing a change that may fix the behavior we're seeing.
Updated by Brian Felton over 8 years ago
Confirmed bug still exists in master. In RGWPutACLs::execute, RGWRados::set_attrs is called with an attrs bufferlist that has only been populated with the RGW_ATTR_ACL. In RGWRados::set_attrs, RGW_ATTR_ACL, RGW_ATTR_ETAG, and RGW_ATTR_CONTENT_TYPE are all extracted from the bufferlist and eventually passed to RGWRados::Bucket::UpdateIndex::complete, which resets the ETag and Content Type values to empty.
The fix is to populate bufferlist attrs in RGWPutACLs::execute with the object's attributes prior to overwriting the ACLs with the provided change. The patch has been compiled and packaged and verified on a 0.94.3 deployment.
Pull request is forthcoming.
Updated by Brian Felton over 8 years ago
Submitted PR -- https://github.com/ceph/ceph/pull/5861
Updated by Yehuda Sadeh over 8 years ago
- Status changed from New to Fix Under Review
Updated by Yehuda Sadeh over 8 years ago
- Status changed from Fix Under Review to Pending Backport
- Backport set to hammer
Merged commit:7496741ebbd75b74d5ffeca5341cccb2318176e6
Updated by Nathan Cutler over 8 years ago
- Backport changed from hammer to hammer,infernalis
Updated by Nathan Cutler over 8 years ago
- Copied to Backport #13819: infernalis: Setting ACL on Object removes ETag added
Updated by Nathan Cutler over 8 years ago
- Copied to Backport #13820: hammer: Setting ACL on Object removes ETag added
Updated by Loïc Dachary over 7 years ago
- Status changed from Pending Backport to Resolved