Project

General

Profile

Actions

Bug #11639

closed

Object copy bug

Added by Javier M. Mellid almost 9 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Normal
Target version:
-
% Done:

0%

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

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>


Files

s3copyobject.py (2.73 KB) s3copyobject.py Javier M. Mellid, 05/15/2015 12:14 PM

Related issues 3 (0 open3 closed)

Related to rgw - Bug #11563: RadosGW regression: COPY doesn't preserve Content-TypeResolvedOrit Wasserman05/07/2015

Actions
Copied to rgw - Backport #11754: Object copy bugResolvedNathan Cutler05/15/2015Actions
Copied to rgw - Backport #11755: Object copy bugResolvedAbhishek Lekshmanan05/15/2015Actions
Actions #1

Updated by Javier M. Mellid almost 9 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.

Actions #2

Updated by Greg Farnum almost 9 years ago

  • Project changed from Ceph to rgw
Actions #3

Updated by Nathan Cutler almost 9 years ago

  • Status changed from New to Fix Under Review
Actions #4

Updated by Yehuda Sadeh almost 9 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.

Actions #5

Updated by Javier M. Mellid almost 9 years ago

Test available in #11753 (pull request asked)

Actions #6

Updated by Nathan Cutler over 8 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF