Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy API doesn't copy user meta data. [JIRA: RCS-153] #1097

Closed
Tracked by #1103
ksauzz opened this issue Mar 19, 2015 · 3 comments
Closed
Tracked by #1103

Copy API doesn't copy user meta data. [JIRA: RCS-153] #1097

ksauzz opened this issue Mar 19, 2015 · 3 comments
Assignees
Milestone

Comments

@ksauzz
Copy link
Contributor

ksauzz commented Mar 19, 2015

S3 object can contain user meta data which are stored by 'x-amz-meta-*' header on PUT Object, and 'PUT Object - Copy' API should copy these meta data. Riak CS doesn't do that.

This bug is found by one of ceph tests. After the fix, the test can be enabled.

reproduction

put a object with 2 meta data.

% s3curl.pl --id user --put Makefile -- -x localhost:8080  http://test.s3.amazonaws.com/1 -H "x-amz-meta-param1: value1" -H "x-amz-meta-param2: value2" -i
HTTP/1.1 100 Continue

HTTP/1.1 200 OK
Server: Riak CS
ETag: "487d4776ae93cc20feddd887e1226fc8"
Date: Thu, 19 Mar 2015 07:32:04 GMT
Content-Type: text/plain
Content-Length: 0

get a object

% s3curl.pl --id user -- -x localhost:8080  http://test.s3.amazonaws.com/1 -X HEAD -i
HTTP/1.1 200 OK
x-amz-meta-param2: value2               <---- meta data
x-amz-meta-param1: value1               <---- meta data
Server: Riak CS
Last-Modified: Thu, 19 Mar 2015 07:32:04 GMT
ETag: "487d4776ae93cc20feddd887e1226fc8"
Date: Thu, 19 Mar 2015 07:32:18 GMT
Content-Type: application/octet-stream
Content-Length: 6239

copy a object

% s3curl.pl --id user --copySrc test/1 -- -x localhost:8080  http://test.s3.amazonaws.com/2 -H "Content-Length: 0" -i
HTTP/1.1 200 OK
Server: Riak CS
ETag: "487d4776ae93cc20feddd887e1226fc8"
Date: Thu, 19 Mar 2015 07:33:46 GMT
Content-Type: application/xml
Content-Length: 175

<?xml version="1.0" encoding="UTF-8"?><CopyObjectResult><LastModified>2015-03-19T07:33:46.000Z</LastModified><ETag>"487d4776ae93cc20feddd887e1226fc8"</ETag></CopyObjectResult>

get a copied object

% s3curl.pl --id user -- -x localhost:8080  http://test.s3.amazonaws.com/2 -X HEAD -i
HTTP/1.1 200 OK
Server: Riak CS
Last-Modified: Thu, 19 Mar 2015 07:33:46 GMT                    <------ no meta data
ETag: "487d4776ae93cc20feddd887e1226fc8"
Date: Thu, 19 Mar 2015 07:34:21 GMT
Content-Type: application/octet-stream
Content-Length: 6239
@Basho-JIRA Basho-JIRA changed the title Copy API doesn't copy user meta data. Copy API doesn't copy user meta data. [JIRA: RCS-153] Mar 19, 2015
@shino
Copy link
Contributor

shino commented Mar 19, 2015

Quote from AWS doc [1]

When copying an object, you can preserve most of the metadata (default) or specify new metadata.
However, the ACL is not preserved and is set to private for the user making the request.

[1] PUT Object - Copy - Amazon Simple Storage Service
http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectCOPY.html

@shino
Copy link
Contributor

shino commented Aug 11, 2015

Will be addressed by #1212

@Basho-JIRA
Copy link

For release note: this change is part of RCS-257, please refer its comment.

_[posted via JIRA by Shunichi Shinohara]_

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants