Bug #11639
Object copy bug
0%
Description
In a situation with 2 users A & B. There is a object copy bug when user B tries to copy one object created by A with FULL_CONTROL to user B.
With this bug report I am uploading one python script reproducing the bug (it uses boto)
The behaviour in aws' s3 and radosgw is different too.
In aws's s3 it dumps the following:
$ ./s3copyobject.py
Creating 'aws1-99999-transfer-bug-bucket
Press <Enter> to continue with copy object...
Copying object
Press <Enter> to continue with print results...
Content as per aws1
<Policy: aws1 (owner) = FULL_CONTROL, aws2 = FULL_CONTROL>
'aws1-99999-test-file' by 'aws1' ['meta1': 'None', 'meta2': 'None']
'aws1-99999-test-file' => <Policy: aws1 (owner) = FULL_CONTROL, aws2 = FULL_CONTROL>
Error reading aws1-99999-test-file-02
Content as per aws2
<Policy: aws1 (owner) = FULL_CONTROL, aws2 = FULL_CONTROL>
'aws1-99999-test-file' by 'aws1' ['meta1': 'None', 'meta2': 'None']
'aws1-99999-test-file' => <Policy: aws1 (owner) = FULL_CONTROL, aws2 = FULL_CONTROL>
'aws1-99999-test-file-02' by 'aws2' ['meta1': 'None', 'meta2': 'None']
'aws1-99999-test-file-02' => <Policy: aws2 (owner) = FULL_CONTROL>
In radosgw it dumps the following:
$ ./s3copyobject.py
Creating 'testuser1-99999-transfer-bug-bucket
Press <Enter> to continue with copy object...
Copying object
Traceback (most recent call last):
File "./s3copyobject.py", line 66, in <module>
copy_object()
File "./s3copyobject.py", line 62, in copy_object
bucket.copy_key(file_name + "-02", bucket_name, file_name)
File "/usr/lib/python2.7/dist-packages/boto/s3/bucket.py", line 762, in copy_key
response.reason, body)
boto.exception.S3ResponseError: S3ResponseError: 403 Forbidden
<Error><Code>AccessDenied</Code></Error>
Related issues
Associated revisions
rgw: Use attrs from source bucket on copy
On copy objects, when bucket source is the same as the destination, use attrs
from source bucket.
Fixes: #11639
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
rgw: Use attrs from source bucket on copy
On copy objects, when bucket source is the same as the destination, use attrs
from source bucket.
Fixes: #11639
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
(cherry picked from commit 1dac80df1d4a2364154ed8b404d13609936c257b)
rgw: Use attrs from source bucket on copy
On copy objects, when bucket source is the same as the destination, use attrs
from source bucket.
Fixes: #11639
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
(cherry picked from commit 1dac80df1d4a2364154ed8b404d13609936c257b)
History
#1 Updated by Javier M. Mellid over 8 years ago
It looks on copy objects, when bucket source is the same as the destination we should use attrs from source bucket.
Created pull request here...
https://github.com/ceph/ceph/pull/4688
Testing the fix with s3copyobject.py aws' s3 and radosgw show the same behaviour/output now.
#2 Updated by Greg Farnum over 8 years ago
- Project changed from Ceph to rgw
#3 Updated by Nathan Cutler over 8 years ago
- Status changed from New to Fix Under Review
#4 Updated by Yehuda Sadeh over 8 years ago
- Status changed from Fix Under Review to Pending Backport
- Backport set to hammer, firefly
Note: we need to create a test for this in s3-tests. Opened issue #11753.
#5 Updated by Javier M. Mellid over 8 years ago
Test available in #11753 (pull request asked)
#6 Updated by Nathan Cutler over 8 years ago
- Status changed from Pending Backport to Resolved