When an SLO manifest A in a versioned container is overwritten by object B, the manifest A is resolved and the assembled large object is copied to the versions container. The original manifest is lost. Then when the object B in the versioned container is deleted, it is replaced with the large object, not the original manifest.
# oops, now the versions container has 4MB file
% curl -H 'X-Auth-Token: AUTH_tk5a7c8aa2656847769335c3809ab62c6b' "http://localhost:8080/v1/AUTH_test/c1_versions?format=json"[{"hash": "b5cfa9d6c8febd618f91ac2843d50a1c", "last_modified": "2016-01-22T12:29:45.369080", "bytes": 4194304, "name": "00cslo_manifest/1453465138.03144", "content_type": "application/octet-stream"}]%
# and its not just the listing telling us that when really its a manifest, it really is not a manifest...
% curl -H 'X-Auth-Token: AUTH_tk5a7c8aa2656847769335c3809ab62c6b' "http://localhost:8080/v1/AUTH_test/c1_versions/00cslo_manifest/1453465138.03144?multipart_manifest=get" -I
HTTP/1.1 200 OK
Content-Length: 4194304
Accept-Ranges: bytes
Last-Modified: Fri, 22 Jan 2016 12:29:46 GMT
Etag: b5cfa9d6c8febd618f91ac2843d50a1c
X-Timestamp: 1453465785.36908
Content-Type: application/octet-stream
X-Trans-Id: tx26f122fcaa2049b49e9d7-0056a220ff
Date: Fri, 22 Jan 2016 12:30:55 GMT
# and oops, we now have alare object, not the manifest, copied back
% curl -H 'X-Auth-Token: AUTH_tk5a7c8aa2656847769335c3809ab62c6b' "http://localhost:8080/v1/AUTH_test/c1/slo_manifest?multipart_manifest=get" -I
HTTP/1.1 200 OK
Content-Length: 4194304
Accept-Ranges: bytes
Last-Modified: Fri, 22 Jan 2016 12:31:09 GMT
Etag: b5cfa9d6c8febd618f91ac2843d50a1c
X-Timestamp: 1453465868.72903
Content-Type: application/octet-stream
X-Trans-Id: txd37023de79194f558902e-0056a22116
Date: Fri, 22 Jan 2016 12:31:18 GMT
When an SLO manifest A in a versioned container is overwritten by object B, the manifest A is resolved and the assembled large object is copied to the versions container. The original manifest is lost. Then when the object B in the versioned container is deleted, it is replaced with the large object, not the original manifest.
To reproduce:
#create containers, segment and manifest... 656847769335c38 09ab62c6b' "http:// localhost: 8080/v1/ AUTH_test/ c1_versions" -X PUT 656847769335c38 09ab62c6b' "http:// localhost: 8080/v1/ AUTH_test/ c1_segments" -X PUT 656847769335c38 09ab62c6b' "http:// localhost: 8080/v1/ AUTH_test/ c1" -X PUT -H 'X-Versions- Location: c1_versions' 656847769335c38 09ab62c6b' "http:// localhost: 8080/v1/ AUTH_test/ c1_segments/ 4MB_file" -X PUT -T 4MB_file 656847769335c38 09ab62c6b' "http:// localhost: 8080/v1/ AUTH_test/ c1/slo_ manifest? multipart- manifest= put" -X PUT -T slo_manifest
% curl -H 'X-Auth-Token: AUTH_tk5a7c8aa2
% curl -H 'X-Auth-Token: AUTH_tk5a7c8aa2
% curl -H 'X-Auth-Token: AUTH_tk5a7c8aa2
% curl -H 'X-Auth-Token: AUTH_tk5a7c8aa2
% curl -H 'X-Auth-Token: AUTH_tk5a7c8aa2
# sanity check, the versions container is empty and the manifest is a manifest... 656847769335c38 09ab62c6b' "http:// localhost: 8080/v1/ AUTH_test/ c1_versions? format= json" 656847769335c38 09ab62c6b' "http:// localhost: 8080/v1/ AUTH_test/ c1/slo_ manifest? multipart_ manifest= get" -I 32e67a57ece7cf3 61b" octet-stream Large-Object: True ec089ccf- 0056a21df4
% curl -H 'X-Auth-Token: AUTH_tk5a7c8aa2
[]%
% curl -H 'X-Auth-Token: AUTH_tk5a7c8aa2
HTTP/1.1 200 OK
Content-Length: 4194304
Last-Modified: Fri, 22 Jan 2016 12:16:41 GMT
Connection: close
Etag: "a42db41ea9e4a9
X-Timestamp: 1453465000.92552
Date: Fri, 22 Jan 2016 12:17:56 GMT
Content-Type: application/
X-Static-
X-Trans-Id: tx4fb306cefd4b4
# now overwrite the manifest, it doesn't matter what the content is... 656847769335c38 09ab62c6b' "http:// localhost: 8080/v1/ AUTH_test/ c1/slo_ manifest? multipart- manifest= put" -X PUT -T slo_manifest
% curl -H 'X-Auth-Token: AUTH_tk5a7c8aa2
# oops, now the versions container has 4MB file 656847769335c38 09ab62c6b' "http:// localhost: 8080/v1/ AUTH_test/ c1_versions? format= json"[{"hash": "b5cfa9d6c8febd 618f91ac2843d50 a1c", "last_modified": "2016-01- 22T12:29: 45.369080" , "bytes": 4194304, "name": "00cslo_ manifest/ 1453465138. 03144", "content_type": "application/ octet-stream" }]%
% curl -H 'X-Auth-Token: AUTH_tk5a7c8aa2
# and its not just the listing telling us that when really its a manifest, it really is not a manifest... 656847769335c38 09ab62c6b' "http:// localhost: 8080/v1/ AUTH_test/ c1_versions/ 00cslo_ manifest/ 1453465138. 03144?multipart _manifest= get" -I 18f91ac2843d50a 1c octet-stream 9b49e9d7- 0056a220ff
% curl -H 'X-Auth-Token: AUTH_tk5a7c8aa2
HTTP/1.1 200 OK
Content-Length: 4194304
Accept-Ranges: bytes
Last-Modified: Fri, 22 Jan 2016 12:29:46 GMT
Etag: b5cfa9d6c8febd6
X-Timestamp: 1453465785.36908
Content-Type: application/
X-Trans-Id: tx26f122fcaa204
Date: Fri, 22 Jan 2016 12:30:55 GMT
# now delete the object in the versioned container... 656847769335c38 09ab62c6b' "http:// localhost: 8080/v1/ AUTH_test/ c1/slo_ manifest" -X DELETE
% curl -H 'X-Auth-Token: AUTH_tk5a7c8aa2
# and oops, we now have alare object, not the manifest, copied back 656847769335c38 09ab62c6b' "http:// localhost: 8080/v1/ AUTH_test/ c1/slo_ manifest? multipart_ manifest= get" -I 18f91ac2843d50a 1c octet-stream f558902e- 0056a22116
% curl -H 'X-Auth-Token: AUTH_tk5a7c8aa2
HTTP/1.1 200 OK
Content-Length: 4194304
Accept-Ranges: bytes
Last-Modified: Fri, 22 Jan 2016 12:31:09 GMT
Etag: b5cfa9d6c8febd6
X-Timestamp: 1453465868.72903
Content-Type: application/
X-Trans-Id: txd37023de79194
Date: Fri, 22 Jan 2016 12:31:18 GMT