Project

General

Profile

Bug #12955

Setting ACL on Object removes ETag

Added by Mike Beyer over 7 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
High
Assignee:
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
hammer,infernalis
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
rgw
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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
}

]


Related issues

Copied to rgw - Backport #13819: infernalis: Setting ACL on Object removes ETag Rejected
Copied to rgw - Backport #13820: hammer: Setting ACL on Object removes ETag Resolved

Associated revisions

Revision 7496741e (diff)
Added by Brian Felton about 7 years ago

rgw: fix modification to index attrs when setting acls

Fixes: #12955

- add ACL change after initial population
- populate bufferlist with object attributes

Signed-off-by: Brian Felton <>

Revision 4420929e (diff)
Added by Brian Felton about 7 years ago

rgw: fix modification to index attrs when setting acls

Fixes: #12955

- add ACL change after initial population
- populate bufferlist with object attributes

Signed-off-by: Brian Felton <>
(cherry picked from commit 7496741ebbd75b74d5ffeca5341cccb2318176e6)

History

#1 Updated by Yehuda Sadeh over 7 years ago

This looks like a duplicate of something that we fixed recently.

#2 Updated by Mike Beyer over 7 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.

#3 Updated by Brian Felton about 7 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.

#4 Updated by Yehuda Sadeh about 7 years ago

  • Priority changed from Normal to High

#6 Updated by Loïc Dachary about 7 years ago

  • Target version deleted (v0.94.4)

#7 Updated by Yehuda Sadeh about 7 years ago

  • Status changed from New to Fix Under Review

#8 Updated by Yehuda Sadeh about 7 years ago

  • Assignee set to Yehuda Sadeh

10981

#9 Updated by Yehuda Sadeh about 7 years ago

  • Status changed from Fix Under Review to Pending Backport
  • Backport set to hammer

Merged commit:7496741ebbd75b74d5ffeca5341cccb2318176e6

#10 Updated by Nathan Cutler about 7 years ago

  • Backport changed from hammer to hammer,infernalis

#11 Updated by Nathan Cutler about 7 years ago

  • Copied to Backport #13819: infernalis: Setting ACL on Object removes ETag added

#12 Updated by Nathan Cutler about 7 years ago

  • Copied to Backport #13820: hammer: Setting ACL on Object removes ETag added

#13 Updated by Loïc Dachary over 6 years ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF