I'm trying to use container-sync inside a single Liberty Swift cluster to move
data from a Docker Registry to a different container in a different project.
The sync itself seems to be progressing well, but I'm running into bizarre
errors when trying to configure the Registry application against the new
container.
The problem seems to be with DLOs. On the receiving side, the DLO shows up in
the container listing, but 404 is returned when trying to GET it.
I'll grab an example. Here's what I can see in the source container:
1. GET on the container finds the object. (It's listed with zero size, which is wrong, but whatever.)
I'm trying to use container-sync inside a single Liberty Swift cluster to move
data from a Docker Registry to a different container in a different project.
The sync itself seems to be progressing well, but I'm running into bizarre
errors when trying to configure the Registry application against the new
container.
The problem seems to be with DLOs. On the receiving side, the DLO shows up in
the container listing, but 404 is returned when trying to GET it.
I'll grab an example. Here's what I can see in the source container:
1. GET on the container finds the object. (It's listed with zero size, which is wrong, but whatever.)
$ curl -i -H 'X-Auth-Token: <redacted>' 'https:/ /swift. local/v1/ AUTH_<source- project- id>/<source- container> ?prefix= files/docker/ registry/ v2/blobs/ sha256/ 03/0374098d7d82 6c67f/data& format= json' -Sync-Key: <redacted> -Object- Count: 499476 Policy: default -Sync-To: <redacted> -Bytes- Used: 1108641002465 abcafa16- 0057b1d093
HTTP/1.1 200 OK
X-Container
Content-Length: 271
X-Container
X-Storage-
Accept-Ranges: bytes
X-Container
X-Container
X-Timestamp: 1447781107.80138
Content-Type: application/json; charset=utf-8
X-Trans-Id: tx387d34644f584
Date: Mon, 15 Aug 2016 14:24:20 GMT
[{"hash": "d41d8cd98f00b2 04e9800998ecf84 27e", "last_modified": "2016-07- 19T11:31: 30.437110" , "bytes": 0, "name": "files/ docker/ registry/ v2/blobs/ sha256/ 03/0374098d7d82 6c67f/data" , "content_type": "application/ octet-stream" }]
2. When I get the DLO, the content is returned.
$ curl --head -H 'X-Auth-Token: <redacted>' https:/ /swift. local/v1/ AUTH_<source- project- id>/<source- container> /files/ docker/ registry/ v2/blobs/ sha256/ 03/0374098d7d82 6c67f/data 9789dcefb1e26a0 3ce" Manifest: <source- container> /segments/ 2f6/46f636b2569 0827fec7a67d8 octet-stream 5b8b3c46- 0057b1cb7b
HTTP/1.1 200 OK
Content-Length: 1905
Etag: "d3120bba48f047
Accept-Ranges: bytes
Last-Modified: Tue, 19 Jul 2016 11:31:31 GMT
X-Object-
X-Timestamp: 1468927890.43711
Content-Type: application/
X-Trans-Id: tx1ee45a0383e44
Date: Mon, 15 Aug 2016 14:02:35 GMT
3. And of course, since this is a DLO, I can GET on the container to list the segments (just one in this case).
$ curl -i -H 'X-Auth-Token: <redacted>' 'https:/ /swift. local/v1/ AUTH_<source- project- id>/<source- container> ?prefix= segments/ 2f6/46f636b2569 0827fec7a67d8& format= json' -Sync-Key: <redacted> -Object- Count: 499426 Policy: default -Sync-To: <redacted> -Bytes- Used: 1108364443373 99c8c8cf- 0057b1cc2b
HTTP/1.1 200 OK
X-Container
Content-Length: 499
X-Container
X-Storage-
Accept-Ranges: bytes
X-Container
X-Container
X-Timestamp: 1447781107.80138
Content-Type: application/json; charset=utf-8
X-Trans-Id: txb1369af939e54
Date: Mon, 15 Aug 2016 14:05:31 GMT
[{"hash": "293fa5ac84ff3c 10d690e192cbcfa 95f", "last_modified": "2016-07- 19T11:31: 28.772710" , "bytes": 1905, "name": "segments/ 2f6/46f636b2569 0827fec7a67d8/ 000000000000000 1", "content_type": "application/ octet-stream" }]
Nothing fancy until here. Let's see how things look in the target container:
1. GET on the container finds the object (again, with zero size).
$ curl -i -H 'X-Auth-Token: <redacted>' 'https:/ /swift. local/v1/ AUTH_<target- project- id>/<target- container> ?prefix= files/docker/ registry/ v2/blobs/ sha256/ 03/0374098d7d82 6c67f/data& format= json' -Sync-Key: <redacted> -Object- Count: 485432 Policy: default -Meta-Temp- Url-Key: <redacted> -Bytes- Used: 1102059424351 5848dde0- 0057b1c857
HTTP/1.1 200 OK
X-Container
Content-Length: 271
X-Container
Accept-Ranges: bytes
X-Storage-
X-Container
X-Container
X-Timestamp: 1469003815.67509
Content-Type: application/json; charset=utf-8
X-Trans-Id: tx85710b95e5124
Date: Mon, 15 Aug 2016 13:49:11 GMT
[{"hash": "d41d8cd98f00b2 04e9800998ecf84 27e", "last_modified": "2016-07- 19T11:31: 30.437110" , "bytes": 0, "name": "files/ docker/ registry/ v2/blobs/ sha256/ 03/0374098d7d82 6c67f/data" , "content_type": "application/ octet-stream" }]
2. Which means that I can GET the object, too. Except I can't. Wait, what?
$ curl -i -H 'X-Auth-Token: <redacted>' https:/ /swift. local/v1/ AUTH_<target- project- id>/<target- container> /files/ docker/ registry/ v2/blobs/ sha256/ 03/0374098d7d82 6c67f/data; echo 70fbfb03- 0057b1c859
HTTP/1.1 404 Not Found
Content-Length: 70
Content-Type: text/html; charset=UTF-8
X-Trans-Id: tx01b439f8583b4
Date: Mon, 15 Aug 2016 13:49:13 GMT
<html><h1>Not Found</h1><p>The resource could not be found.</p></html>
3. The segment has been synced correctly, though.
$ curl -i -H 'X-Auth-Token: <redacted>' 'https:/ /swift. local/v1/ AUTH_<target- project- id>/<target- container> ?prefix= segments/ 2f6/46f636b2569 0827fec7a67d8& format= json' -Sync-Key: <redacted> -Object- Count: 485457 Policy: default -Meta-Temp- Url-Key: <redacted> -Bytes- Used: 1102135036266 87f89e56- 0057b1d3da
HTTP/1.1 200 OK
X-Container
Content-Length: 499
X-Container
Accept-Ranges: bytes
X-Storage-
X-Container
X-Container
X-Timestamp: 1469003815.67509
Content-Type: application/json; charset=utf-8
X-Trans-Id: tx348d8516cb0e4
Date: Mon, 15 Aug 2016 14:38:18 GMT
[{"hash": "293fa5ac84ff3c 10d690e192cbcfa 95f", "last_modified": "2016-07- 19T11:31: 28.772710" , "bytes": 1905, "name": "segments/ 2f6/46f636b2569 0827fec7a67d8/ 000000000000000 1", "content_type": "application/ octet-stream" }]