Project

General

Profile

Actions

Bug #14447

closed

etag and content type after changing ACL and adding headers

Added by Vladislav Odintsov over 8 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
% Done:

0%

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

Description

Hi all!
Today I've tested the patch from http://tracker.ceph.com/issues/13820 in our testing environment and it worked, but since I'm not a ceph developer or maintainer, I don't know if it works okay or not.

First test:

I noticed that "tag", "content_type" fields were changed after changing ACL of object: "etag" and "content_type" fields were concatenated with: \u0000. In amazon ETag doesn't change, when you modify meta or ACL.

object before changing ACL:

# radosgw-admin bi list --bucket=eee --object=GitX-L_v0.8.4.zip@
[
    {
        "type": "plain",
        "idx": "GitX-L_v0.8.4.zip",
        "entry": {
            "name": "GitX-L_v0.8.4.zip",
            "instance": "",
            "ver": {
                "pool": 9,
                "epoch": 1582
            },
            "locator": "",
            "exists": "true",
            "meta": {
                "category": 1,
                "size": 1383025,
                "mtime": "2016-01-21 06:07:42.000000Z",
                "etag": "fac95801d317708e1ade2460ab2f2f0b",
                "owner": "4f33e60b-ad60-4dde-803a-bf866f9b3eff",
                "owner_display_name": "user",
                "content_type": "application\/zip",
                "accounted_size": 1383025
            },
            "tag": "default.54122.565",
            "flags": 0,
            "pending_map": [],
            "versioned_epoch": 0
        }
    }

]

Modify S3 ACL s3cmd:

$ s3cmd setacl s3://eee/GitX-L_v0.8.4.zip --acl-public

Check:

# radosgw-admin bi list --bucket=eee --object=GitX-L_v0.8.4.zip
[
    {
        "type": "plain",
        "idx": "GitX-L_v0.8.4.zip",
        "entry": {
            "name": "GitX-L_v0.8.4.zip",
            "instance": "",
            "ver": {
                "pool": 9,
                "epoch": 1583
            },
            "locator": "",
            "exists": "true",
            "meta": {
                "category": 1,
                "size": 1383025,
                "mtime": "2016-01-21 06:14:27.000000Z",
                "etag": "fac95801d317708e1ade2460ab2f2f0b\u0000",
                "owner": "4f33e60b-ad60-4dde-803a-bf866f9b3eff",
                "owner_display_name": "user",
                "content_type": "application\/zip\u0000",
                "accounted_size": 1383025
            },
            "tag": "_DJJDk09B5bDCja3UOwvAM5H0SXY-6t3",
            "flags": 0,
            "pending_map": [],
            "versioned_epoch": 0
        }
    }

]

Second test:
Modify meta information with s3cmd modify --add-header:

New object before actions:

# radosgw-admin bi list --bucket=eee --object=64223405724813.mp3
[
    {
        "type": "plain",
        "idx": "64223405724813.mp3",
        "entry": {
            "name": "64223405724813.mp3",
            "instance": "",
            "ver": {
                "pool": 9,
                "epoch": 1689
            },
            "locator": "",
            "exists": "true",
            "meta": {
                "category": 1,
                "size": 2104800,
                "mtime": "2016-01-21 06:01:30.000000Z",
                "etag": "19ba01d0a3a05a83ead3c0ace949b128",
                "owner": "4f33e60b-ad60-4dde-803a-bf866f9b3eff",
                "owner_display_name": "user",
                "content_type": "audio\/mp3",
                "accounted_size": 2104800
            },
            "tag": "default.54117.562",
            "flags": 0,
            "pending_map": [],
            "versioned_epoch": 0
        }
    }

]

add meta with s3cmd:

$ s3cmd modify --add-header='x-amz-meta-test-field: myvalue' s3://eee/64223405724813.mp3
File s3://eee/64223405724813.mp3 modified

check:

# radosgw-admin bi list --bucket=eee --object=64223405724813.mp3
[
    {
        "type": "plain",
        "idx": "64223405724813.mp3",
        "entry": {
            "name": "64223405724813.mp3",
            "instance": "",
            "ver": {
                "pool": 9,
                "epoch": 1691
            },
            "locator": "",
            "exists": "true",
            "meta": {
                "category": 1,
                "size": 2104800,
                "mtime": "2016-01-21 06:02:23.000000Z",
                "etag": "19ba01d0a3a05a83ead3c0ace949b128\u0000",
                "owner": "4f33e60b-ad60-4dde-803a-bf866f9b3eff",
                "owner_display_name": "user",
                "content_type": "audio\/mp3\u0000",
                "accounted_size": 2104800
            },
            "tag": "_Cc9P9-6HLGTa64dYg-Wk0Z-WjtlGthv",
            "flags": 0,
            "pending_map": [],
            "versioned_epoch": 0
        }
    }

]

Same situation. And where is my meta variable in the output? Shouldn't it be shown?
Though, there are no new symbols in curl output:

$ curl -X HEAD -I http://eee.my_awesome_server/64223405724813.mp3
HTTP/1.1 200 OK
Date: Thu, 21 Jan 2016 06:18:17 GMT
Accept-Ranges: bytes
ETag: "19ba01d0a3a05a83ead3c0ace949b128" 
x-amz-meta-test-field: myvalue
Content-Length: 2104800
Last-Modified: Thu, 21 Jan 2016 06:02:23 GMT
Connection: close
Content-Type: audio/mp3

Is it an expected behaviour or I patched ceph incorrectly?
I took srpm for 0.94.3 here: http://download.ceph.com/rpm-hammer/rhel6/SRPMS/ceph-0.94.3-0.el6.src.rpm and added commit from pull request: https://github.com/ceph/ceph/pull/6620 as a patch. Exit code for patch command for 0 and everything was ok.

Actions #1

Updated by Casey Bodley about 4 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF