Object Versioning for Large Object does not work
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
Fix Released
|
Undecided
|
Alistair Coles |
Bug Description
When SLO/DLO manifest is contained in the container with X-Versions-Location header, the manifest is copied to the versions-location container for overriding PUT request. However, when the manifest is restored by deleting overriding one, the manifest does no longer work as expected.
For example in SLO:
$ curl -v -X PUT -H "X-Auth-Token: <token>" -H "X-Versions-
$ curl -v -X PUT -d @part1 -H "X-Auth-Token: <token>" http://
$ curl -v -X PUT -d @part2 -H "X-Auth-Token: <token>" http://
$ curl -v -X PUT -d @manifest -H "X-Auth-Token: <token>" http://
$ curl -v -X HEAD -H "X-Auth-Token: <token>" http://
< HTTP/1.1 200 OK
< Content-Length: 2097152
< Accept-Ranges: bytes
< Last-Modified: Fri, 05 Sep 2014 06:57:41 GMT
< Etag: "6538fda7d1a764
< X-Timestamp: 1409900260.68222
< X-Static-
< Content-Type: application/
< X-Trans-Id: txaa55b130048a4
< Date: Fri, 05 Sep 2014 06:57:43 GMT
# Suppose parts of large object are updated
$ curl -v -X PUT -d @part1 -H "X-Auth-Token: <token>" http://
$ curl -v -X PUT -d @part2 -H "X-Auth-Token: <token>" http://
$ curl -v -X PUT -d @manifest -H "X-Auth-Token: <token>" http://
$ curl -v -X HEAD -H "X-Auth-Token: <token>" http://
< HTTP/1.1 200 OK
< Content-Length: 2097152
< Accept-Ranges: bytes
< Last-Modified: Fri, 05 Sep 2014 06:59:51 GMT
< Etag: "a025ac8e76cd51
< X-Timestamp: 1409900390.15489
< X-Static-
< Content-Type: application/
< X-Trans-Id: tx0d7041a520364
< Date: Fri, 05 Sep 2014 07:00:04 GMT
# Suppose you find some mistakes in uploaded file, then you want to revert old large object
$ curl -v -X DELETE -d @manifest -H "X-Auth-Token: <token>" http://
< HTTP/1.1 200 OK
< Content-Type: text/plain
< X-Trans-Id: tx3c8db72d65ff4
< Date: Fri, 05 Sep 2014 07:05:26 GMT
< Transfer-Encoding: chunked
<
Number Deleted: 3
Number Not Found: 0
Response Body:
Response Status: 200 OK
Errors:
$ curl -v -X GET -H "X-Auth-Token: <token>" http://
< HTTP/1.1 200 OK
< Content-Length: 380
< Accept-Ranges: bytes
< Last-Modified: Fri, 05 Sep 2014 07:05:27 GMT
< Etag: fb72065d4ac2537
< X-Timestamp: 1409900726.67266
< Content-Type: application/
< X-Trans-Id: tx4e9cdd1164104
< Date: Fri, 05 Sep 2014 07:06:09 GMT
<
[{"hash": "068a2aa5d4c382
The root cause of this behavior seems that X-Static-
Changed in swift: | |
status: | New → Confirmed |
assignee: | nobody → Zhou Yuan (yuan-zhou) |
Changed in swift: | |
assignee: | Zhou Yuan (yuan-zhou) → Alistair Coles (alistair-coles) |
Changed in swift: | |
status: | Confirmed → In Progress |
Fix proposed to branch: master /review. openstack. org/123765
Review: https:/