Actions
Feature #19053
openrgw: swift API: support to retrieve manifest for SLO
Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
% Done:
0%
Source:
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:
Description
Current RGW code (tested on jewel v10.2.5) doesn't support retrieving manifest.
Even if "?multipart-manifest=get"
is specified, concatenated object is returned.
https://docs.openstack.org/developer/swift/overview_large_objects.html#retrieving-a-large-object
Updated by Rajath Shashidhara about 7 years ago
I'm working on this feature. In the build from the latest source code, I'm unable to retrieve the SLO object (GET returns a 200, but the response data has some HTTP header fields (Keep Alive, etc.) and the header is blank). Can somebody verify this ?
Updated by Osamu KIMURA about 7 years ago
Here is our test procedure:
$ export OS_AUTH_TOKEN=AUTH_tkXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX $ echo "1-------1" >test.obj-1 $ echo "2-------2" >test.obj-2 $ echo "3-------3" >test.obj-3 $ md5sum test.obj-1 8894928dc692a8cbcd48e6900730d731 *test.obj-1 $ md5sum test.obj-2 50b7173d9985fcefedb85c3eb06576a0 *test.obj-2 $ md5sum test.obj-3 3cdc2a371243b870ed4691e7308deda8 *test.obj-3 $ cat >manifest <<EOF
[ { "path": "seg/test.obj-1", "etag": "8894928dc692a8cbcd48e6900730d731", "size_bytes": 10 }, { "path": "seg/test.obj-2", "etag": "50b7173d9985fcefedb85c3eb06576a0", "size_bytes": 10 }, { "path": "seg/test.obj-3", "etag": "3cdc2a371243b870ed4691e7308deda8", "size_bytes": 10 } ]
EOF $ curl -i -X PUT -H "X-Auth-Token: $OS_AUTH_TOKEN" http://rgw/swift/v1/AUTH_john/seg/test.obj-1 -T test.obj-1 HTTP/1.1 100 CONTINUE HTTP/1.1 201 Created etag: 8894928dc692a8cbcd48e6900730d731 Last-Modified: Tue, 07 Mar 2017 01:26:41 GMT X-Trans-Id: tx000000000000000000028-0058be0c51-82576-default Content-Type: text/plain; charset=utf-8 Content-Length: 0 Date: Tue, 07 Mar 2017 01:26:41 GMT $ curl -i -X PUT -H "X-Auth-Token: $OS_AUTH_TOKEN" http://rgw/swift/v1/AUTH_john/seg/test.obj-2 -T test.obj-2 HTTP/1.1 100 CONTINUE HTTP/1.1 201 Created etag: 50b7173d9985fcefedb85c3eb06576a0 Last-Modified: Tue, 07 Mar 2017 01:26:50 GMT X-Trans-Id: tx000000000000000000029-0058be0c5a-82576-default Content-Type: text/plain; charset=utf-8 Content-Length: 0 Date: Tue, 07 Mar 2017 01:26:50 GMT $ curl -i -X PUT -H "X-Auth-Token: $OS_AUTH_TOKEN" http://rgw/swift/v1/AUTH_john/seg/test.obj-3 -T test.obj-3 HTTP/1.1 100 CONTINUE HTTP/1.1 201 Created etag: 3cdc2a371243b870ed4691e7308deda8 Last-Modified: Tue, 07 Mar 2017 01:27:05 GMT X-Trans-Id: tx00000000000000000002a-0058be0c69-82576-default Content-Type: text/plain; charset=utf-8 Content-Length: 0 Date: Tue, 07 Mar 2017 01:27:05 GMT $ curl -i -X GET -H "X-Auth-Token: $OS_AUTH_TOKEN" http://rgw/swift/v1/AUTH_john/seg HTTP/1.1 200 OK X-Timestamp: 0.00000 X-Container-Object-Count: 3 X-Container-Bytes-Used: 30 X-Container-Bytes-Used-Actual: 12288 X-Storage-Policy: default-placement X-Trans-Id: tx00000000000000000002b-0058be0c82-82576-default Content-Length: 32 Accept-Ranges: bytes Content-Type: text/plain; charset=utf-8 Date: Tue, 07 Mar 2017 01:27:30 GMT test.obj-1 test.obj-2 test.obj-3 $ curl -i -X PUT -H "X-Auth-Token: $OS_AUTH_TOKEN" 'http://rgw/swift/v1/AUTH_john/container1/test.obj?multipart-manifest=put' -T manifest HTTP/1.1 100 CONTINUE HTTP/1.1 201 Created etag: "4bcd295dd12750bfce08aebbcdab7fdc" Last-Modified: Tue, 07 Mar 2017 01:30:47 GMT X-Trans-Id: tx00000000000000000002c-0058be0d47-82576-default Content-Type: text/plain; charset=utf-8 Content-Length: 0 Date: Tue, 07 Mar 2017 01:30:47 GMT $ curl -i -X GET -H "X-Auth-Token: $OS_AUTH_TOKEN" http://rgw/swift/v1/AUTH_john/container1 HTTP/1.1 200 OK X-Timestamp: 0.00000 X-Container-Object-Count: 1 X-Container-Bytes-Used: 0 X-Container-Bytes-Used-Actual: 0 X-Storage-Policy: default-placement X-Trans-Id: tx000000000000000000030-0058be0d6d-82576-default Content-Length: 8 Accept-Ranges: bytes Content-Type: text/plain; charset=utf-8 Date: Tue, 07 Mar 2017 01:31:25 GMT test.obj $ curl -i -X GET -H "X-Auth-Token: $OS_AUTH_TOKEN" http://rgw/swift/v1/AUTH_john/container1/test.obj HTTP/1.1 200 OK Content-Length: 30 Accept-Ranges: bytes Last-Modified: Tue, 07 Mar 2017 01:30:47 GMT X-Timestamp: 1488850247.28016 X-Static-Large-Object: True etag: "4bcd295dd12750bfce08aebbcdab7fdc" X-Object-Meta-Static-Large-Object: X-Trans-Id: tx000000000000000000037-0058be0e9a-82576-default Content-Type: binary/octet-stream Date: Tue, 07 Mar 2017 01:36:26 GMT 1-------1 2-------2 3-------3 $ curl -i -X GET -H "X-Auth-Token: $OS_AUTH_TOKEN" 'http://rgw/swift/v1/AUTH_john/container1/test.obj?multipart-manifest=get' HTTP/1.1 200 OK Content-Length: 30 Accept-Ranges: bytes Last-Modified: Tue, 07 Mar 2017 01:30:47 GMT X-Timestamp: 1488850247.28016 X-Static-Large-Object: True etag: "4bcd295dd12750bfce08aebbcdab7fdc" X-Object-Meta-Static-Large-Object: X-Trans-Id: tx000000000000000000038-0058be0ea8-82576-default Content-Type: binary/octet-stream Date: Tue, 07 Mar 2017 01:36:40 GMT 1-------1 2-------2 3-------3
Updated by Rajath Shashidhara about 7 years ago
Same experiment performed on OpenStack Swift yields the result -
$ curl -i -X GET -H "X-Auth-Token: $OS_AUTH_TOKEN" $OS_STORAGE_URL/folder1/test.obj?multipart-manifest=get HTTP/1.1 200 OK Content-Length: 531 Accept-Ranges: bytes Last-Modified: Wed, 08 Mar 2017 16:00:48 GMT Etag: 0925a6ed89bcb226f43c8721d31bf66a X-Timestamp: 1488988847.77558 X-Static-Large-Object: True Content-Type: application/json; charset=utf-8 X-Trans-Id: txe3ecacb0c7be4d4880005-0058c02ba8 X-Openstack-Request-Id: txe3ecacb0c7be4d4880005-0058c02ba8 Date: Wed, 08 Mar 2017 16:04:56 GMT
[
{
"hash": "8894928dc692a8cbcd48e6900730d731",
"last_modified": "2017-03-08T15:58:45.000000",
"bytes": 10,
"name": "/seg/test.obj-1",
"content_type": "application/octet-stream"
},
{
"hash": "50b7173d9985fcefedb85c3eb06576a0",
"last_modified": "2017-03-08T15:59:05.000000",
"bytes": 10,
"name": "/seg/test.obj-2",
"content_type": "application/octet-stream"
},
{
"hash": "3cdc2a371243b870ed4691e7308deda8",
"last_modified": "2017-03-08T15:59:11.000000",
"bytes": 10,
"name": "/seg/test.obj-3",
"content_type": "application/octet-stream"
}
]
Updated by Rajath Shashidhara about 7 years ago
Actions